Should you motivate the "pros" of why you would employ an ORM to management/client, an amount the reason why be?
Try to keep one reason per answer to ensure that we are able to see what will get chosen as the very best reasons
Speeding development. For instance, getting rid of repetitive code like mapping query result fields to object people and vice-versa.
Making data access more abstract and portable. ORM implementation classes understand how to write vendor-specific SQL, so it's not necessary to.
The most crucial reason to make use of an ORM is to ensure that you'll have a wealthy, object oriented business design but still have the ability to store it and write effective queries rapidly against a relational database. From my point of view, I do not use whatever real advantages that the good ORM provides you with when in comparison along with other produced DAL's apart from the advanced kinds of queries you are able to write.
One sort of query I'm considering is really a polymorphic query. An easy ORM query might choose all shapes inside your database. You receive a assortment of shapes back. But each instance is really a square, circle or rectangle based on its discriminator.
Another kind of query could be one which eagerly brings an item and a number of related objects or collections in one database call. e.g. Each shape object is came back using its vertex and side collections populated.
I apologize to disagree because of so many others here, however i don't believe that code generation is a great enough reason alone to choose an ORM. You are able to write or find many good DAL templates for code machines that don't possess the conceptual or performance overhead that ORM's do.
Or, if you feel you don't have to understand how to write good SQL to make use of an ORM, again, I disagree. It may be correct that in the outlook during writing single queries, depending with an ORM is simpler. But, with ORM's it's way too simple to create poor carrying out programs when designers do not understand how their queries use the ORM and also the SQL they result in.
Getting an information layer that actually works against multiple databases could be a benefit. It isn't one which I've needed to depend on that frequently though.
Ultimately, I must reiterate that in my opinion, if you're not while using more complex query options that come with your ORM, you will find other available choices that solve the rest of the issues with less learning and less CPU cycles.
Ok last one, some designers do find dealing with ORM's to become fun so ORM's will also be good in the keep-your-designers-happy perspective. =)
Supporting OO encapsulation of economic rules inside your data access layer. You are able to write (and debug) business rules inside your application language associated with preference, rather than cumbersome trigger and saved procedure languages.
Producing boilerplate code for fundamental CRUD procedures. Some ORM frameworks can inspect database metadata directly, read metadata mapping files, or use declarative class qualities.
To ensure that your object model and persistence model match.
The main reason I am considering it's to prevent the produced code from VS2005's DAL tools (schema mapping, TableAdapters).
The DAL/BLL i produced more than a year ago was working fine (for which I'd built it for) until another person began utilizing it to make the most of a few of the produced functions (that we had no clue have there been)
It appears enjoy it will give you an infinitely more intuitive and cleaner solution compared to DAL/BLL solution from http://wwww.asp.internet
I believed about produced my very own SQL Command C# DAL code generator, however the ORM appears like a far more elegant solution
To minimise duplication of simple SQL queries.
You are able to proceed to different database software easily since you are developing for an abstraction.
Development happiness, IMO. ORM abstracts away many of the bare-metal stuff you need to do in SQL. It keeps your code base simple: less source files to handle and schema changes do not require hrs of upkeep.
I am presently utilizing an ORM and contains increased my development.
.internet tiers using code cruz templates
Why code something that may be produced equally well.