DataPortal.CreateAsync does not call DataPortal_Create through the data portal using CSLA 4.5.501

DataPortal.CreateAsync does not call DataPortal_Create through the data portal using CSLA 4.5.501

Old forum URL: forums.lhotka.net/forums/t/12581.aspx


Russ posted on Thursday, April 10, 2014

I am creating a Silverlight 5 application with the latest CSLA 4.5.501 (installed via Nuget). I am using the new async await syntax and have discovered that DataPortal.CreateAsync does not call the DataPortal_Create method on a simple BusinessBase object.

If I change the DataPortal.CreateAsync call to DataPortal_FetchAsync in the factory method then it successfully calls the DataPortal_Fetch method through the data portal.

Calling the CreateAsync with no parameters does not call the “protected override void DataPortal_Create()” method and calling CreateAsync with a single string parameter does not call the “protected void DataPortal_Create(string username)”.

If I flag the DataPortal_Create method as [RunLocal] and move it outside the #if !SILVERLIGHT #endif block then the CreateAsync call works.

Adding a try catch around the DataPortal.CreateAsync call does not catch any exceptions.

I know my WCF configuration is correct because the DataPortal_Fetch works.

Has anyone else observed this behaviour?

RockfordLhotka replied on Tuesday, April 22, 2014

The failure case is with a remote data portal?

Russ replied on Tuesday, April 22, 2014

Yes.  My WCF configuration is copied from CSLA4.5.500\Samples\Net\cs\SimpleNTier solution.

Copyright (c) Marimer LLC