I’ve extracted interfaces from my repository classes, like ICustomerRepository, IProductRepository and so on. The project which contains the repositories is named X.DataAccessLayer. Should I call the project with the interfaces X.DataAccessLayerInterfaces, or what is better?
And I definitely have to keep the interfaces in a separate project (I have 2 projects with implementations of these interfaces).
Use whatever name you can think of that correctly describes the contents and does not feel too long.
Personally, X.DataAccessLayerInterfaces feels too long for me, so I would probably opt for X.DataAccessInterfaces, but otherwise there is nothing wrong with it.
1
The naming pattern also depends on your other projects. Depending on the contents of your implementation projects it could be something like this:
- X.DataAccessLayer
- X.DataAccessLayer.Sql
- X.DataAccessLayer.Oracle
PS: I would drop ‘Layer’ as well, unless you have a mix of independent libraries and actual layers.
1
I would go with x.DataAccess.Interface and have your implementations as x.DataAccess.Oracle, x.DataAccess.EF or whatever.
1