How-To-Select
Guides
  • Home
  • Sections
  • Topics
  • Services
  • Projects
  • Products
  • Vendors
  • Contact
  • About

Navigation

  • Recent posts
Home » Table of Contents - Object-Relational Mapping Tools for .NET, 1st Edition » Informed Opinions about O/R Mapping Tools for .NET, 1st Edition
NOTE: Read about our Current Status

Fabrice Marguerie on How-To-Select an O/R Mapping Tool for .NET (2006)

Expert:
Fabrice Marguerie
Topic:
O/R Mapping Tools for .NET

After a period of lag behind Java, the offering of object-relational mapping for .NET is very rich. You can choose from open source or commercial, and from light to full-blown. You really don't have any excuse not to consider using an object-relational mapping tool, especially since you have this guide to help you ;-)

Some tools offer a really interesting approach: they support both code generation and generic object-relational mapping. This gives a real advantage because you can get strongly-typed code and validation at compile-time without losing functionality. As a simple example, compare the two following lines of code and consider what happens in both cases when you modify the mapping information and accidentally (or deliberately) remove the mapping for the Cat class.

1. Cat cat = (Cat) session.Load(typeof(Cat), "Bob");
2. Cat cat = CatDao.GetCat("Bob");

Chances are high that the second line produces a compilation error and the first one won't choke until run-time. Look at the following lines and ask yourself which one you prefer and why:

1. IList cats = session.List(typeof(Cat));
2. CatCollection cats = CatDao.List();
3. IList<Cat> cats = context.List<Cat>();

One more thing you could consider is whether the tool offers support for .NET 2.0 and the generics. This indicates that the editor keeps his product up-to-date and allows you to benefit from the interesting features that come with .NET 2.0.

‹ Andres Aguiar on How-To-Select an O/R Mapping Tool for .NET (2006)upFrancesco Aliverti-Piuri on How-To-Select an O/R Mapping Tool for .NET (2006) ›
  • Login or register to post comments
Design by styleshout Drupalized by All Drupal Themes Perfected by NewClarity LLC