Client-only Question

Client-only Question

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


LParker posted on Tuesday, June 09, 2009

I'm new to CSLA .NET and am awaiting my copy of Expert C# 2008 Business Objects in the mail.

In the meantime, I've been playing around with the Project Tracker sample to get a feel for it.

Is there any way to avoid including server-side code (e.g. LINQ to SQL for Fetch) in the business objects so the client-side doesn't get this code deployed?  The Project Tracker app uses partial classes and *.Server.cs files to better partition the database access code, but they are still part of the assembly that is distributed to the client.

I'm not planning on using the .NET client-only framework (at this point, anyway), but it would be nice at some point, and I know they disallow server technologies like LINQ to SQL in that (which makes sense).  Aside from that, I like to encapsulate my LINQ to SQL code in "data manager" assemblies anyway, and I don't want these on the client side.

Thanks for any help.

-Larry

JonnyBee replied on Tuesday, June 09, 2009

Hi,

Yes, you can move the data access code to another assembly using the ObjectFactory classes.

And - even if you use Linq2Sql or Linq2EF in the Dataportal_XYZ methods (and keep the LinqDAL models in a separate assembly) does not require you to have the LinqDAL assemblies distribued to the client.

I would suggest you buy the "CSLA for Silverlight" video series from Rocky. Video #6 is almost 109 minutes dedicated to different data access technologies and organization code.

/jonny

LParker replied on Wednesday, June 10, 2009

Thanks, I appreciate the help.

-Larry

 

Copyright (c) Marimer LLC