I am an asp.net web application developer and I always have used Enterprise Library DAAB with stored procedures for data access with 4 seprate layers (presentation layer, custom types layer, business logic layer and data access layer).
My feeling is that this approach is wasting much time.
I have not worked with other ways of accessing data but sure there are many ways that save development time. While searching I read about these:
- Data Adapters they generate whole DAL with stored procedures
- Linq with different flavers
- Entity Framework
- Using data controls like SQLDataSource and Dynamic Data
- Other mappers, code generaters and utilities
So much options and my little knowledge, I am confused in making decision what development patern I should adopt considering that my development may be fast, extendable, re-usable and up to the standard. Also I want to go for a way in which my code libraries can be used with other technolgies like silverlight, mvc framework, services if I ever need to use.
Kindly guide me and help.
thanks
For accessing relational databases such as SQL Server an Object Relational Mapper (ORM) is very useful. In the .NET space Entity Framework from Microsoft and the open source NHibernate are popular choices. I highly recommend trying one of these.
Entity Framework has drag-n-drop style designer support in Visual Studio and NHibernate has better code based configuration. I would recommend trying which ever of those options sounds best to you.
Coming from Enterprise Library and stored procedures you will quickly find how easy these tools make CRUD tasks, however like anything for more complex updating and querying there is a bit to learn.