CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

DataPortal Switch

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 3 Replies | 2 Followers

Not Ranked
2 Posts
Damien Turnbull posted on Wed, Jun 27 2012 11:45 PM

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!

 

All Replies

Top 10 Contributor
1,770 Posts
Suggested by JonnyBee

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/

Jonny Bekkum, Norway CslaContrib Coordinator

Not Ranked
2 Posts

Thanks. I'll check it out.

Top 10 Contributor
9,270 Posts

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.

Rocky

Page 1 of 1 (4 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems