linq to sql - Linq2SQL vs EF in .net Framework 4.0 -
so what's verdict on these 2 products now? can't seem find regarding issue vs2010/.net 4.0
back in .net 3.5 days, people believe linq2sql dead when .net 4.0 comes around, seems alive , well.
on other hand, ef 4.0 seems have gotten significant improvement.
for me, of work far small medium sized projects, , company migrating vs08 vs10 soonish. should looking at? or really, should spend time studying ef4.0 or time more spent looking @ nhibernate? (but on topic, i'm more interested in linq2sql - ef.)
lastly, using entlib / unity, framework more friendly dependency/policy injection?
thanks in advance.
here reasons why entity framework (v4) better:
1 - l2sql obsolete
2 - l2sql not support poco mapping, ef does.
3 - ef has more flexibility (code first, model first, database first). l2sql has 1.
4 - ef has support sproc -> poco mapping
5 - ef has entity-sql, allowing go classic ado.net when required
6 - ef supports inheritance (tpt, tph)
7 - ef goes hand-in-hand repository pattern, , deferred execution via iqueryable
8 - ef components (objectset, objectcontext) mockable , allow di
i cannot think of reason why new projects should use l2sql.
some might "well l2sql small projects, can drag , drop , done it".
well can ef4 well, , you'll have more flexibility/support in long run if decide modify/grow project. not excuse.
hth
Comments
Post a Comment