I am try to learn DDD, so bear with me please. Let say I have an aggregate called Issue. It has a StatusId property. This status can be ie. Open, Closed... and it is stored in a database table called Statuses. (this is because specific user can have specific statuses, so I want the user be able to add new statuses) Now, I have crated a method like this in the Issue aggregate: public static void SubmitIssue(Guid projectId, string issueTitle, string description...)
this method Creates new Issue with the req. params and after that I need to set it into the correct state. But the state is specified in the DB. How to handle this scenario when I must get the data from the DB when doing business logic that must not be couplet do the database access at all? Please help