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?
Thanks!
Hi,
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 http://silverdb.codeplex.com/
Thanks. I'll check it out.
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