65.9K
CodeProject is changing. Read more.
Home

What to Look for in an ORM Solution?

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.75/5 (3 votes)

Mar 14, 2011

CPOL

1 min read

viewsIcon

12808

What to Look for in an ORM Solution?

One question that I am sometimes being asked is what to look for in an ORM solution or more properly which ORM ORM_thumb[1]is preferable and why. The decision which ORM to choose is very crucial to the project development since after you start developing it will be hard to go back and use another ORM solution. Since there are many ORMs out there, here is a checklist that will help you to evaluate ORM solutions and to pick the one that fits your needs:

  • Basic Features
    • Can handle inheritance & polymorphism
    • Can handle different types of relations (1-1, 1-N, N-M)
    • Supports transactions
    • Supports different SQL operations (aggregation, grouping, ordering)
  • Extended Features
    • Multiple databases support
    • Allows execution of dynamic queries using a query language
    • Data Binding support
    • Stored Procedure and Function support (only if needed)
    • Can handle very big models and databases
  • Flexibility
    • Allows customization of SQL queries
    • Supports Joins and Sub-Queries
    • Supports concurrency
    • Can handle specific Database types (identity, GUIDs, XML…)
  • Ease of use
    • Graphical designer for mappings
    • Auto generation of model classes
    • Generate Database schema (Model First approach)
    • Maintainable (when Database schema changes)
  • Optimizations & Performances
    • Allows Lazy loading
    • Allows Eager loading
    • First level cache
    • Second level cache
    • Optimizes queries
    • Supports Bulk updates & deletions
  • SOA
    • Supports model serialization
    • Allows loading of disconnected objects
    • Supports disconnected state tracking
    • Model objects are readable in other platforms
  • Other things to consider
    • Price
    • Performance
    • Support for multiple platforms
    • Source code provided
    • Documentation & Support
    • Maturity
    • Vendor stability

This is a suggested list and there are more things to evaluate other than that which can help you to make the relevant decision.