+1  A: 

No. Repositories should represent domain model concepts, not entity level concepts, and certainly not database level. Think about all the things you would want to do with a given component of your domain, for example, Spaces.

One of the things that you'll want to do, is GetSpaceCategories(). This should definitely be included in the Spaces repository, as anyone dealing with Spaces will want access to the Space categories without having to instantiate some other repository.

A generic repository would be fairly counter-productive I would think. Treating a repository like a utility class would virtually guarantee that any moderately complex operation would have to instantiate both repositories.

womp
With this approach, UpdateSpaceCategory(SpaceCategory spaceCategory) and DeleteSpaceCategory(string id) would also be in the ISpaceRepository as well, correct?
Ryan Taylor
For sure. The purpose of the repository is to hide the underlying data access. If you were to switch out your database layer, the rest of your program would still be calling GetCategories() or UpdateCategory() on the repository - the change would be transparent to the repository consumer.
womp