How to develop program/website and minimize DB dependencies using C#.NET? For example I have made some changes in my DB, after that I must rewrite half a project.
+1
A:
The strategy it to split your application to a different logical layers abstracting the data storage layer from the business logic and UI.
So a simple example will be to have:
- Data Layer - your database engine;
- Data Access Layer - code which will know how to read and manipulate data from the Data Layer;
- Business Layer - will know how to represent Data Access Layer object within your data domain;
- Presentation Layer - to display/edit Business Layer objects.
For not very complex domains you can use technologies like LINQ to SQL or ADO.NET Entity Framework to act as 2-3 layers.
Regent
2010-09-08 10:01:42