Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What ORM should I use for a ASP.Net MVC project?

I am starting a new ASP.Net MVC project and was wondering what is the best Model approach to take.

Most demos recommend LinqToSQL but I know Microsoft are not really enhancing this product and are focusing more on the Entity Framework.

I like the Subsonic approach but I thought this was going to be built in with MVC with version 3 but there has been no news about the development stage of this project so I am a bit wary of using version 2 if there is to be a new release soon.

I have heard of NHibernate and Castle Record but have not had any experience at all with these and have heard numerous pros/cons for both.

Any help would be highly recommended!

like image 318
Jon Avatar asked Mar 30 '09 09:03

Jon


People also ask

What is ORM in ASP.NET MVC?

Object-relational mapping is a programming technique for converting data between incompatible type systems in object-oriented programming languages.

Which framework is best for ASP.NET MVC?

If you are an expert at ASP.NET MVC, you need not to spend time on some other complex frameworks but ASP.NET WEBAPI is the best one for you. It works on the same lines as MVC – though it doesn't have System.

Does ASP NET have an ORM?

ORM models are gaining high popularity among ASP.NET software companies in USA, as it is provides better performance, scalability, reliability and maintainability to software applications. The ORM's use is to take programmers' LINQ statements and translate them into SQL queries for ASP.NET application .

Which framework is used in ASP.NET MVC?

The view engines used in the ASP.NET MVC 3 and MVC 4 frameworks are Razor and the Web Forms. Both view engines are part of the MVC 3 framework. By default, the view engine in the MVC framework uses Razor .


2 Answers

nHibernate learning curve is higher but worth it. Use Fluent nHibernate to ease the pain a bit. nHibernate is less visual that some ORMs but that is really only an issue when you are beginning and once you have experience with it the lack of visual designer is a benefit IMO.

like image 72
Craig Avatar answered Sep 20 '22 01:09

Craig


For SubSonic, Rob just release an new MVC template which you can use when starting a new project that bakes a lot of good stuff into a new MVC project including a pre-release of SubSonic 3. Detais are available on Rob Conery's blog.

like image 33
Pervez Choudhury Avatar answered Sep 21 '22 01:09

Pervez Choudhury