tags:

views:

75

answers:

6

Which orm you would recommend for a beginner moving from ado.net?... Thus far used ado.net stored procedures with asp.net and now like to move with an orm.. Any suggestion..

+2  A: 

NHibernate. The new development branch - much better support for LINQ than the current released versions.

TomTom
+4  A: 

NHibernate is nice, but it does require a bit more configuration for the ORM (even though fluent NHhibernate is quite nice).

I have heard that beginners in .NET ORM's have had quite good success with Subsonic: http://www.subsonicproject.com/.

Anders Oestergaard Jensen
SubSonic FTW IMO
Sky Sanders
While I don't think there is a good "beginner" ORM for .NET, SubSonic certainly comes the closest. I would recommend not getting attached to it though (it lacks depth of features).
Michael Maddox
A: 

NHibernate is currently one of the most popular ORM's, but Microsoft has been busy working on Entity framework. In time this may become the most popular and the best simply because it comes with .Net Framework.

James Westgate
+1  A: 

At the risk of sounding odd - why not http://msdn.microsoft.com/en-us/library/bb425822.aspx??

Yes, I know - Microsoft has officially said there wouldn't be much more development on it - even though it was bugfixed and enhanced in .NET 4. It's still in .NET 4 - so it'll be around for at least 3-5 years. It's easy to use - much easier than NHibernate - with a visual designer and code generation.

It's simple and easy to understand, and it can give you a great intro to using an ORM.

Once you've learned, internalized, and understood the principles, you can always move on to a more enterprise-ready solution, like NHibernate, or Entity Framework v4.

See Scott Guthrie's excellent blog post series on Using Linq-to-SQL for a great intro, or check out the Nerddinner tutorial which showcases ASP.NET MVC and Linq-to-SQL.

marc_s
For basic usage scenarios, the friction with SubSonic is so much less than the friction with LinqToSql. SubSonic also doesn't have some of LinqToSql's limitations (database-first only, SQL Server only, inflexible out of the box). LinqToSql can be considered easier to use than EF/NH because there are so many things it just can’t/won’t do. That’s not a good kind of usability when you have a real world data model to deal with.
Michael Maddox
@Michael Maddox: yeah, but Subsonic does lack the nice visual designer, which can be very useful to a beginner.
marc_s
@marc_s: It may be okay for a beginner, but personally I'm not at all a fan of the Visual Designer: http://www.capprime.com/software_development_weblog/PermaLink,guid,f1a9b52c-b407-4cbb-9197-4bae289ae11d.aspx
Michael Maddox
@Michael Maddox: "LinqToSql can be considered easier to use than EF/NH because there are so many things it just can't/won't do." Perhaps, but if you want to use it the way it was *actually intended* to be used - i.e. by writing Linq expressions against it - then it does a lot *more* than EF/NH, which don't support anywhere close to the full range of Linq extensions. The first version of EF didn't even support `Contains`.
Aaronaught
A: 

I'd second the LINQ2SQL option if you're using SQL Server.

LINQ2SQL:

  • is easy to learn, with lots of guidance available online;
  • has good tooling for design and debugging in Visual Studio; and
  • provides adequate performance for all but the most extreme of situations (StackOverflow uses it for data access, for example).

There have been rumours of its demise for a while, but Microsoft's market research seems to show more developer support than for Entity Framework which, whilst arguably more powerful, is also more complex. LINQ skills are transferable to other ORMs too, with options for LINQ2Entities (for Entity Framework) and, I believe, support from SubSonic also.

SimonF
A: 

Entity Framework

Definitely try that out. Solid support from Microsoft themselves, support for Many-to-Many relationships, eSQL lets you at the lower layers, etc.

kervin