We are starting a MVC 3 Project with Razor and i am confused which approach to take when it comes to accessing/updating data. I know we have the following options.
* Plain old ADO.NET
* LINQ to SQL
* NHibernate
* Entity Framework
But i am more inclined towards using Plain Old ADO.Net (Since i think this is the fastest)
I would still use the Model classes, but once i get the data from the class, i would like to go ahead and call a stored procedure using Plain Ado.Net, rather than using EF Update methods.
I would like to get your opinions if there are any disadvantages to this approach compared to using EF.
(This is going to be a public website with lot of traffic !)
I was asked this by a candidate in a an interview this week. We only use stored procedures and the ADO.NET methods. We chose this because, we have found that to make great performing applications with ORM you need to be an expert in using it. Since I do not have any experts in ORM and I do not plan on creating/hiring any, it makes sense to stick with the stack that we know.
I say that you need to be an expert because of the way that ORMs such as Hibernate (or NHibernate) create the relationships and consequently the SQL (mostly joins, etc). I think that ORM is great for small tools or RAD environments where things MUST get done fast and also may not live forever. I think for the larger enterprise applications where maintenance and performance is more critical, then ADO is safer. This does not mean it is not impossible, but more care must be taken to ensure it.
I know that this is a very hot topic and that ORM is a lot simpler than ADO, but honestly ADO is not that hard. I am eager to hear what the rest of the community has to say about this!