Click here to Skip to main content
11,496,146 members (558 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: C# ASP.NET SQL Framework
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
Comments
Espen Harlinn at 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
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.
  Permalink  
Comments
Pravin Patil, Mumbai at 18-Jan-11 9:02am
   
Thanks a lot.
Espen Harlinn at 18-Jan-11 9:12am
   
5+ Good answer
Pravin Patil, Mumbai at 18-Jan-11 9:24am
   
Yeah.....Just three lines and need of ORM explained....
Espen Harlinn at 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 at 18-Jan-11 9:34am
   
Which ORM tool you use the most, and which one you find the best...?
Espen Harlinn at 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 at 18-Jan-11 9:56am
   
Thank you very much Espen for sharing your knowledge.
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.
  Permalink  
Comments
Pravin Patil, Mumbai at 18-Jan-11 9:02am
   
Thank you very much sir for your quick reply.
shreekar at 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 at 18-Jan-11 9:07am
   
Ok......
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 at 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
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 18 Jan 2011
Copyright © CodeProject, 1999-2015
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