DataPortal Switch

DataPortal Switch

Old forum URL:

damtur posted on Wednesday, June 27, 2012

We're about to develop an application in Silverlight using CSLA which needs to run in 'offline mode' when there is no connectivity to the server. The Silverilght app will be out of browser.

Am wondering if there is neat way for us to configure the DataPortal to stop using WCF to load it's data from the server when comms is unavailable, but rather load the data from a local database instead?



JonnyBee replied on Thursday, June 28, 2012


No, there is no switch - this is typically handled in your code (as you must specify ProxyMode on the DataPortal call in SL).

You could create your own baseclasses or implement in the BO - to check for availability to select the proxy mode.

You must also be aware that Silverlight has no database connectivity.  There is a few database projects implemented in silverlight for "isolated storage" but no connectivity to f.ex SqlServer or Oracle. Look at f.ex

damtur replied on Thursday, June 28, 2012

Thanks. I'll check it out.

RockfordLhotka replied on Saturday, June 30, 2012

I do discuss creating a custom proxy in the Using CSLA 4: Data Portal Configuration book. This is the recommended way to address your question - create a custom proxy that delegates to WcfProxy or LocalProxy depending on the network status.

Copyright (c) Marimer LLC