C# .NET Database Development – Best Practices and Realities

cdatabase-developmentnet

The development team I'm working with will be moving to .NET 4.0 soon, however, the data access class library we use still uses ADO.NET "classic", meaning SqlDataReader, DataTable, and the like. Meanwhile, it seems like Microsoft and probably the rest of the world is moving forward with Entity Framework and WCF Data Services. I didn't find anything on MSDN that indicated which of the data access technologies Microsoft considers best practices.

Does Microsoft have a preference? What data access are most people using currently? Are there good reasons to stay with ADO.NET classic and not move to Entity Framework?

Best Answer

In my firm we are using the EF. It's a nice ORM, suitable for our small project. In reality people are using EF or NHibernate. Both frameworks are good. EF has a great MS support and you can find great tools bundled with Visual Studio. NHibernate is considered better than EF but there is a bigger "learning curve" so you will spend more time adopting it.

I think that, if you are on the Ado.Net "classic" try the EF. Create a simple project and replace some of the DAL methods. Check how it works and how you can manage/modify the code. Compare it with the simple "SqlDataReader" methods and decide which is better. Remember that every technology shift needs some time for adoption so you have to calculate if this change will be beneficial for your company in the long run.

Related Topic