Silverlight CSLA - BO invokes DAL

Silverlight CSLA - BO invokes DAL

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


cconte posted on Friday, January 06, 2012

 

Hi All,

I've just completed watching  the CSLA Core and MvvM video series.  We currently are utilizing the standard DataPortal_XYZ methods into an Silverlight application to retrieve our data but we want to move to utilize a separate DAL (BO invokes DAL) to have both DataAccess.MsSQL and DataAccess.MySQL.

Has anyone utilize this option  into silverlight Application ?

Additionally, are there any silverlight examples available in constructing this DAL project with SQLExpress available?  Actually, i have tried to realized  a DalFactory class like i saw in som WPF samples but the ConfigurationManager class is not available in Silverlight. So, i'm wondering what is the best pratice to made it ?

Thanks in advance for your help,

Cedric

 

JonnyBee replied on Friday, January 06, 2012

Do you expect to have both available at the same time?

Silverlight has no data access (no database drivers)  - so you you can use the DataPortal to communicate with a serveside (.NET) based layer.

The options for your DataAccess can then be:

Or use Csla in the Silverlight app only and call WCF Data Services on a server to do the data access.

A couple small sample apps on  http://cslacontrib.codeplex.com shows how you can utilize MEF to create a "pluggable" data access layer with either Repository pattern or ObjectFactory pattern (download latest source code).

cconte replied on Friday, January 06, 2012

Thanks JonnyBee.

We only want one of them available at the same time (DataAccess.MsSQL or DataAcess.MySQL). Each DataAccess must be implemented in a in separate assembly and choosed by the application with an option write into web.config file.

I will have a look at these samples.

Best regards,

Cedric 

bill.mybiz replied on Sunday, January 08, 2012

There are also superb examples in the Csla Data Access e-book download.  They're exactly what you're looking for.  The EncapsulatedInvokeDto is what I referred to most, as I am using Dtos, but they also have an EncapsulatedInvoke data reader example, as well as object factory pattern examples.

cconte replied on Monday, January 09, 2012

Thx for a tips.  Actually, i'm learning from samples provide from CSLA Silverlight video series.

Copyright (c) Marimer LLC