Our organisation uses inline sql. We have been tasked with providing a suitable data access layer and are weighing up the pro’s and cons of which way to go…
- Datasets
- ADO.net
- Linq
- Entity framework
- Subsonic
- Other?
Some tutorials and articles I have been using for reference:
- http://www.asp.net/(S(pdfrohu0ajmwt445fanvj2r3))/learn/data-access/tutorial-01-vb.aspx
- http://www.simple-talk.com/dotnet/.net-framework/designing-a-data-access-layer-in-linq-to-sql/
- http://msdn.microsoft.com/en-us/magazine/cc188750.aspx
- http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx
- http://www.subsonicproject.com/
I’m extremely torn, and finding it very difficult to make a decision on which way to go. Our site is a series of 2 internal portals and a public web site. We are using vs2008 sp1 and framework version 3.5.
Please can you give me advise on what factors to consider and any pro’s and cons you have faced with your data access layer.
PS. I found the subsonic web site’s information a bit shallow, and a lot of emphasis seems to be placed on how ‘cool’ it and it’s developers are. I’d much prefer a spoken explanation to their demo video than the music? Does anyone else agree?
Datasets > too much overhead for what you get. This is generally considered an idea that was past it’s prime the day it was released.
ADO.Net (or Enterprise Library) > my personal preference for a host of reasons. However, we never use inline sql for a host of other reasons (mainly security) as well, so your mileage may vary. One reason we do go this route is that our team is very knowledgable about SQL and every one of the generators either falls short on performance or you have to know a fair amount of sql to tweak them. With that choice we opt to just do it ourselves.
Linq > Skip this. New development on LINQ has basically stopped and the resources at MS were moved to the Entity Framework project. I’ve also found threading and other issues within the framework that haven’t been resolved.
Entity Framework > Some people like this. You will still need a good amount of SQL knowledge to get the best out of it.
Subsonic, etc > Don’t have enough experience with 3rd party ones to really tell you the pros/cons.
To sum up, we prefer control and have the knowledge to get the most out of it. We’ve tried the linq / EF route and weren’t exactly impressed. I’ve seen others, and briefly worked with them, but they failed to be performant on anything but the most basic CRUD type statements.
If most of what you are doing is CRUD related, then EF, Subsonic, or similiar will work.
Some things to consider when evaluating:
Good luck.