>>
Customer
    Contact
          Address

for the sake of discussion let's imagine that these are all entities ..

Customer c = CustomerRepo.Fetch(id);
c.Contact.Address.Street = "testing";
UnitOfWork.Commit();
<<

Your use-case knows why you are doing what you are doing.  So it would load 
+ lock the customer and update the address in question.  Do you use the 
custom fetch strategies like Udi does?  It strikes me that if you have a 
custom fetch strategy for each reason to retrieve an entity you also have 
only one place to place the correct Lock code?  What needs to be locked 
depends on what you are doing.  Adding a new order would need to ensure the 
Customer remains unchanged in order to ensure their credit limit is not 
exceeded, whereas cancelling an existing order might not need to touch the 
customer at all.

Fetching strategies seem very interesting to me which is why I just emailed 
Udi and asked (nagged) for a demo app which would combine custom fetching, 
CQS, and domain objects without properties etc; something I am still very 
curious about ;-)



Pete 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to