I'm not familiar with netTiers, but does it support things such as lazy loading? What's it's LINQ support like? Caching? Change Tracking?
In its simplest form EF4 can act like a code generation tool, creating an object hierarchy from the database. But that's not the only approach you can take. You can also go with a code-first approach. And there are mapping options so you can break the entity = table pattern. It's also worth considering that knowledge invested in EF4 will be worthwhile - I can't see it going away, and it's likely to only get better. On Thu, Dec 16, 2010 at 4:30 PM, Greg Keogh <[email protected]> wrote: > We’ve been playing with EF4 for a few days to see if it is a good candidate > as a ‘data layer’ in a project that is being upgraded from VB6. As Kirsten > said a couple of days ago, she has some VB6 classes that represent tables > and there are stored procs to load and save the classes. She would like to > reuse these classes, but I think they’re too old and would be a burden in > .NET where we expect classes to implement things like IEditableObject, > IPropertyNotifyChanged, ISerializable, and have other tracking properties > like IsNew, IsModifed, and also know about relationships. I think it would > be tedious work to refactor the VB6 classes into modern form when it’s so > easy to have them spat out more reliably by a code generator. > > > > So we’ve been reading Programming Entity Framework (2nd > edition)<http://www.amazon.com/Programming-Entity-Framework-Julia-Lerman/dp/059652028X>by > Julia Lerman and running experiments. Now, my first question for you is a > bit vague, but please remember that I used classic ADO.NET for the first 5 > years, then I used netTiers for the last 4 years to generate a DAL. This is > my first serious attempt to evaluate an ORM. Given that, in Julia’s book she > drags all of the tables she needs onto the EF4 designer surface, tweaks them > a little bit with some name changes and says “there’s my model”. Whoopie! So > I ask... > > > > * Why is the model nearly identical to the database? All I get is > class-per-table with some navigation properties for the relationships. > > > > * Why is this superior to what netTiers generates? > > > > I see that EF4 can define inheritance and you can make vertical and > horizontal slices to redefine pieces of tables, but I can’t see where any of > this helps us (at the moment). Where is the M in the ORM? What on earth is > EF4 doing for me that a boring DAL generator like netTiers isn’t doing? > > > > I just expected something more ‘magical’ and sophisticated out of EF4. > Perhaps there are long-term benefits of an ORM that we’re too naive to see > yet. > > > > Greg >
