I would like to develop a database independent data access layer for my web application.This data access layer should communicate with any external(as far as my application is concerned) databases like Ms SQL server,Oracle,Access etc... (as per the user's preference) .I will provide various options-various databases like SQL server,Access,Oracle to the user and he can select any one from it ans start doing interacting with the data of that external database. I Will always have an SQL server database also in my Application to which i want to transfer data from the connected eternal database(SQL server/Ms Access/Oracle) .Do i need to have 2 DataAccess Layers ? one for My SQL server db transactions and the other for communicating with the external database.What is the best methods to achieve this ? I am using VS 2008 for development.Which dot net classes support me for this scenario?
+1
A:
Maybe NHibernate can help you i think you might be able to change the config file and everything will work just fine
Yassir
2009-08-03 11:04:25
+1
A:
You could make an extra abstraction-layer. Maybe call it "Data Persistence Layer", and create contracts for CRUD-operations in that. Then you could use IOC (with, say, structuremap) to map your DAL-implementations to your contracts :)
cwap
2009-08-03 11:20:41