How to structure a Visual Studio project for the data access layer
- by Akk
I currently have a project that uses various DB access technologies mainly for showcasing or for demos.
Currently we have:
Namespace App.Data (App.Data.dll)
Folder NHibernate
Folder EntityFramework
Folder LinqToSql
The above structure is ok as we only use Sql Server as the DB. But going forward we will be including Oracle, MySql etc.
So what would be a better structure with this in mind?
I thought about:
Namespace App.Data.SqlServer (App.Data.SqlServer.dll)
Folder NHibernate
Folder EntityFramework
Folder LinqToSql
Or would it just be better to have separate assemblies for each database and access technology?:
Namespace App.Data.SqlServer.NHibernate (App.Data.SqlServer.NHibernate.dll)
Namespace App.Data.SqlServer.EntityFramework(App.Data.SqlServer.EntityFramework.dll)
Namespace App.Data.Oracle.NHibernate (App.Data.Oracle.NHibernate.dll)
Namespace App.Data.MySql.NHibernate (App.Data.MySql.Oracle.dll)