When implementing the repository pattern should lookup value / tables get their own Repository? -
Based on a modified version of I am creating permanent services for many database organizations. Some of these entities have been associated with viewing table, as shown below:
I have decided to use repository patterns to provide a clear separation between data continuity / recovery; However, I am not sure how to look in the repository (contrary to institutions) should be represented.
Lookup your own store interface with affiliate unit, should be "share" one, or should there be a normal ILookupRepository interface? Read only
For the moment, these are the lookups; However, there will be a time where we may want to edit lookup through services.
Option 1: ISPARR repository. Gatespace CarebarebierID (string id); Option 2: ISPCARCRR DepositorGetBiID (String ID); Option 3: ILQRPository.GetSpecsbrababIID (string ID);
Incidentally, this question relates to any other.
no Repositories should present domain model concepts, not institution-level concepts, and certainly not database level. Think of all the things you want to do with a given component of your domain, for example, spaces.
One of those things that you want to do is GetSpaceCategories () It should definitely be included in the space repository, because any person dealing with the blank space without prompting some other repository Access to space categories.
A generic repository would be good enough - I would think a repository treatment like a utility class would actually guarantee that any minor complicated operation would have to instantiate both repositories.
Comments
Post a Comment