LINQ to Entities

I’ve been investigating LINQ to Entities lately, and I have to tell you, it looks great! I saw a presentation by Adam Cogan and Justin King at Code Camp Oz 08 (http://www.codecampoz.com), which basically compared LINQ to Entities to NHibernate, and after the presentation,  I reckon NHibernate may well be on the way out. Using LINQ to Entities is just so simple. The beauty of both of these systems is that any errors are found at compile time. My article below, titled “Some fix time data” shows that finding code defects is significantly cheaper at compile time than at runtime. Also, finding an error at compile time is preventative. If you have to wait until the application is running before finding a bug, it might be months before you even try a potentially buggy code path. NHibernate requires you to create XML files that contain the details of the tables you are trying to access through objects. LINQ to Entities, on the otherhand, just requires you to drag and drop the objects onto the designer. LINQ to Entities also handles many-to-many relationships in a really easy to use way. Don’t get me wrong, NHibernate looks good, but LINQ to Entities looks like it could be even better!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: