User1696742691 posted
I'd also like to piggy back another question on to this as I continue to dig deeper.
Consider the following scenario, I have DomainObjectA, which has a property of DomainObjectB.
In my business logic layer I get a List<DomainObjectA>. Where is the appropriate place to assign DomainObjectB to my newly returned DomainObjectA? Would it by in my business logic layer?
GetDomainObjectA
foreach(DomainObjectA in List<DomainObjectA>)
{
DomainObjectA.DomainObjectB = DomainObjectA.GetDomainObjectB();
}
Or would it be in a factory class when I am originally constructing DomainObjectA. I would then call my DomainObjectB repository GetById() method. (Assuming I return the ID in my DomainObjectA selection factory).
I hope that makes sense. I'm really trying to get my head around this pattern as a whole and haven't seen a lot of examples or "best practices".
Perhaps it's not as big a decision as I think it is and I need to find something that works in my specific domain.