Click here to Skip to main content
12,700,957 members (29,277 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL
I have worked in a project where most of the business logic was in Stored Procedures (SQL 2005). So we just used to call the stored procedure from Data Access Layer.
I am very new to this ORM concept. Have a fair understanding of it. I have gone through Entity Framework Model, NHibernate, but could not understand the situation where we can make use of them.

Can you please suggest me a practical example, where we can effectively use these ORM tools....
Posted 18-Jan-11 3:18am
Espen Harlinn 18-Jan-11 8:32am
The ORM vs other alternatives is a pretyy hard question to answer. You can often accellerate the development process, but you pay in terms of performance - just my 2ct's
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The best time to use an ORM is:

0) When you don't care how badly a program performs

1) You're willing to give up a certain amount of flexibility

2) You know for sure and certain that there's no way on this earth that you're going to need to modify the generated code.
Pravin Patil, Mumbai 18-Jan-11 9:02am
Thanks a lot.
Espen Harlinn 18-Jan-11 9:12am
5+ Good answer
Pravin Patil, Mumbai 18-Jan-11 9:24am
Yeah.....Just three lines and need of ORM explained....
Espen Harlinn 18-Jan-11 9:30am
Actually, I do use ORM tools, but not for anything performance critical, and I would certainly not replace existing, well functioning code with an ORM.
Pravin Patil, Mumbai 18-Jan-11 9:34am
Which ORM tool you use the most, and which one you find the best...?
Espen Harlinn 18-Jan-11 9:50am
I prefer DevExpress XPO, RemObjects DataAbstract - and use Entity Framework when it's a requirement. I find that XPO is particularly nice when I have to build everything from scratch, and RemObjects DataAbstract is more than a regular ORM tool - it's a great tool for multi-tier development - create a useful server in minutes from an existing database schema - and it supports SilverLight
Pravin Patil, Mumbai 18-Jan-11 9:56am
Thank you very much Espen for sharing your knowledge.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You are looking for a problem to fix with a solution already decided!? Yes, of course you are, because you want to learn how the damn thing is used practically - this is a commendable idea, but sadly missed by many.

Here are a few guidelines:

1. Does the application you write need to be database agnostic?
2. Are you developing a product that needs to support different databases?

In general, where a DB schema remains *almost* constant, an O/R mapper may provide some gains for DB structure to Object serialization and vice versa.

This does not mean that solution for all of the above is O/R M tool, but simply that O/R M tools are appropriate to be evaluated in these scenarios.

Be aware that many similar situations can also be addressed through a well written DAL.

If you have understood the theory and keep your mind open when designing solutions for new projects, you may see some good uses for O/R M.
Pravin Patil, Mumbai 18-Jan-11 9:02am
Thank you very much sir for your quick reply.
shreekar 18-Jan-11 9:06am
Please drop the sir. It is a title bestowed by the England Queen and may not be much relevant even in UK itself today.
Pravin Patil, Mumbai 18-Jan-11 9:07am
Thank you very much shreekar........
It's also a sign of respect within the general population, as in "Yes sir.", "Thank you, sir", or "Would you like fires with your hamburger, sir?"

shreekar 18-Jan-11 9:17am
Agreed. But in context of posting comments to unknown people, seems weird and sometimes, when overdone, also seems facetious.
Or maybe it is just my post colonial hangover...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 18 Jan 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100