CSLA with Linq to Entity

CSLA with Linq to Entity

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


mcsean posted on Sunday, August 10, 2008

I've just gone through the CSLA 3.5.1 ProjectTracker sample, and it is a beauty - a significant code reduction, quicker to write easier to read.

This sample goes very well with Linq to Sql approach. However; my quesiton is, do I use the same approach to start my new project with Linq to Entity? I haven't gone deep into it, but I feel like there will be some overlaps between the Enitity Framework and CSLA.

Any comments?!

By the way, Why does the "Index of Code generation" page miss out the CSLA Factory in its list? This one kicks butts!

RockfordLhotka replied on Sunday, August 10, 2008

I do need to add CSLA Factory to the list (I thought I had actually - maybe I didn't click save or something).

For EF version 1 it will be used in much the same way as LINQ to SQL. EF version 1 has a lot of limitations and though it does better mapping than L2S it has pretty much the same n-tier story (which isn't compelling).

Hopefully future versions of EF will offer some more powerful capabilities, and I'm enhancing the data portal in CSLA 3.6 in anticipation of that possibility.

mcsean replied on Sunday, August 10, 2008

Thanks Rocky! I will be waiting for the 3.6 release. 

I agree with you that at this point may be it is a better idea to stay with L2S. EF is tricky when it comes to working with CSLA in terms of architecture. On the second through, EF & CSLA approach result in a clearer separation of ORM and business logic layer - a perfect match. Hope we don't have to wait for long.

 

cheers!

Copyright (c) Marimer LLC