LINQ to SQL and Entity Framework Classes

218 words.

I’ve been starting to work a little bit with LINQ to SQL and now the ADO.NET Entity Framework* (to implement ORM** for UvMoney, my home banking system).  There’s something that troubles me about both frameworks.  Both require you to build a “model” of your database with a designer, from which strongly-typed classes are generated, which you can then use in your LINQ queries.

This is quite similar to the designer-built strongly-typed DataSets from .NET 1.1 and 2.0, which I never enjoy using very much because there always seems to be something just a little bit wrong with them.  With ADO.NET, my preference has always been to build my own ORM classes.  Which makes me wonder:  How do I take advantage of LINQ to SQL and the Entity Framework while still building my own classes?  I suppose I should give up on that line of thought before I start, because implementing my own ORM classes would essentially be duplicating what LINQ to SQL and the Entity Framework do.

  • According to rumor, Microsoft will be concentrating on the Entity Framework going forward, so there is little point in spending much more effort learning LINQ to SQL classes.

** ORM is Object-Relational Mapping, which is a fancy term for the process of sticking database values into object properties and vice versa.

Related

This page is a static archival copy of what was originally a WordPress post. It was converted from HTML to Markdown format before being built by Hugo. There may be formatting problems that I haven't addressed yet. There may be problems with missing or mangled images that I haven't fixed yet. There may have been comments on the original post, which I have archived, but I haven't quite worked out how to show them on the new site.

Sorry, new comments are disabled on older posts. This helps reduce spam. Active commenting almost always occurs within a day or two of new posts.