We help IT Professionals succeed at work.

classic ado.net vs entlib daab

HI Experts

I was wanting to know the limitations that the entlib daab can perform compared to classic ado.net?

Can entlib do everything that ado.net does?

I know that by using entlib you are using less lines of code, but certain members of the team seem to think that ado will be better, is this the case?

Watch Question

Top Expert 2015
Nothing can do everything that ADO.NET does, because everything is only a wrapper around ADO.NET.

Be it Entreprise Library, LINQ, the entity framework, or anything else they invented or will invent in the next versions, the core is always ADO.NET. Any tool designed to work with databases in .NET is there to ease the coding over ADO.NET, but there are always small little things here and there that they cannot do.

Sure, they save time during development because you have a lot less code to write and they take care of a lot of "painful" things such as converting field values from Object to whathever the type of the field is and a few of the things that make ADO.NET a pain to code against, but ADO.NET is still at the core of everything, so it always gives you more control over what you are doing.

It might take longer to code directly to ADO.NET and requires more knowledge to do it right, but I have found out that using one of the many interfaces created around it makes it harder to debug and maintain your code, because what happens in the background is often hidden from you. Any experienced programmer will tell you that you always spend more time on maintenance than on development. And those who are not masochists prefer development over maintenance. Gaining time in developement to end up spending more time on maintenance is, in my opinion, not a good decision.

But I am almost sure that you will get many answers that will contradict mine.


Hi JamesBurger

Thanks for your feedback i see what you mean, its just a matter of making a team decision and trying out all our test scenarios.
Top Expert 2015

If you are working as a team, then you might have the resources for the following.

Instead of using some of the available tools to automatically creates classes between you and ADO.NET, you might be better to create your own classes. This is how I work personnally when I have a customer that understand the gain.

More work in the first stretch, because designing your own classes might take a few days or even weeks where something like Entreprise Library does it in minutes. But the classes are limited to what you want to do instead of being designed so that can react to most scenarios. You usually gain performance. And they can have extra features that makes their use so much easier, specially for the junior members of the team: constructors that do most of the work, extra methods and properties that makes life easier.

If the design is good, the extra time put up front is usually compensated in great way in maintenance ease and cost.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.