I am trying to get my head around where the aggregates roots lie in my entity framework data model so I know what repositories I need to create.
If I talk in relational database terms for a second, I have an ExceptionGroup object and an Exception object (not system.exception!). An Exception belongs to an ExceptionGroup and cannot exist without an ExceptionGroup.
Should I have a repository for each object or a single repository containing methods for both? If I was to have a single repository the methods would be as follows...
FindAllExceptionsByExceptionGroup(int GroupID)
AddExceptionGroup(ExceptionGroup ExceptionGroup) - because an exception cannot exist without a group.
AddException(DataAccess.Exception Exception)
DeleteExceptionGroupByID(int GroupID)
DeleteExceptionByID(int ExceptionID)
DeleteExceptionByGroup(int GroupID)