6

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).

Den
  • 4,827
  • 2
  • 32
  • 48
user278618
  • 565
  • 1
  • 5
  • 9

3 Answers3

7

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.

Den
  • 4,827
  • 2
  • 32
  • 48
2

I would go with x.DataAccess.Interface and have your implementations as x.DataAccess.Oracle, x.DataAccess.EF or whatever.

Mr Cochese
  • 1,556
  • 10
  • 8
  • Your answer would be stronger if you provided supporting evidence or reasoning to justify the claim you've made. –  May 08 '13 at 10:33
1

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.

Bart van Ingen Schenau
  • 71,712
  • 20
  • 110
  • 179