CSLA .NET

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

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • Silverlight CSLA - BO invokes DAL

    rated by 0 users
    Answered (Verified) This post has 1 verified answer | 4 Replies | 1 Follower

    Top 500 Contributor
    27 Posts
    cconte posted on Fri, Jan 6 2012 5:04 AM

     

    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

     

    Answered (Verified) Verified Answer

    Top 500 Contributor
    22 Posts
    Verified by cconte

    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.

    All Replies

    Top 10 Contributor
    2,279 Posts

    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:

    • Repository pattern, using DataPortal_XYZ methods and Repository objects that hide the actual DAL implementation
    • ObjectFactory pattern where you can create separate ObjectFactories for each database type.

    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).

    Jonny Bekkum, Norway CslaContrib Coordinator

    Top 500 Contributor
    27 Posts

    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 

    Top 500 Contributor
    22 Posts
    Verified by cconte

    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.

    Top 500 Contributor
    27 Posts

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

    Page 1 of 1 (5 items) | RSS

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