I am developing a silverlight application that uses CSLA for the business objects.

I'm trying to set up the DataPortal correctly so that it will correctly call the DataPortal methods that are contained in my .Net class library.

I have my Model and Model.Silverlight projects set so the classes in the silverlight project are created as links and my DataPortal methods are all inside #if !SILVERLIGHT compiler directives. The silverlight UI references the Model.Silverlight project and uses Get methods which then call DataPortal.FetchAsync.

Picture of my project layout here http://i.imgur.com/V3pQppa.jpg

My issue is that FetchAsync returns with the error DataPortal_Fetch not implemented, though the method with the correct signature exists inside the #if !SILVERLIGHT block.

This leads me to believe the data portal is not configured properly. I have the web service created and I can browse to it by right clicking > View in Browser. The web service is also set correctly for Csla.DataPortalClient.WcfProxy.DefaultUrl in the App_Startup. So I honestly do not know what else to try.

Hopefully someone can help as the problem has been plaguing me for days and I can't register on the CSLA forums to post there. Thanks in advance!

有帮助吗?

解决方案

It seems like my issue was I was missing this line in the App_Startup

Csla.DataPortal.ProxyTypeName = typeof(Csla.DataPortalClient.WcfProxy).AssemblyQualifiedName;

Which seems to have become needed in CSLA 4.5

Now the data portal is finding the implemented methods correctly

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top