You then can instead say: "Your purchase request is accepted. Please wait until it is approved." From your requirements it seems that the domain should talk to...
Hi Richard, "But what about the case of guaranteeing that all user names are unique?" IMHO that i rule should be in the "Domain Layer" and not in the...
... I think you misunderstand. If it was as simple as checking within a single order that's no problem. But we want to check against the history of all...
... That's exactly what I'm looking for, and you're right it doesn't belong in a separate bounded context. Now that you put it that way, it sounds like it...
In understand that the rule might be not that simple. It seams that you need to make the concept of OrdersPerHouseHold and HouseHold explicit in the model. ...
It would have to be globally readonly as it could be read in the process of validating other items in the aggregate (think repeatable read isolation level) ......
... I think Bodrin's solution is good too, but note that all you're doing here is playing with ACID isolation levels. If you put a shared lock (isolation...
I was admonsished that many questions are already answered in the archives, but I'm having a hard time identifying the information I need. Feel free to point...
... This is similar to another recent thread (http://tech.groups.yahoo.com/group/domaindrivendesign/message/14592); you either enforce a strict enforcement of...
Are you suggesting that he load the whole history of orders into his domain? Even if he does that, there is still the possibility that another is added that...
So the Domain has business rules that need to run, and however you get that to happen (Domain events etc) you don't have a db context to lock until you hand...
... That's going to depend on your architecture, but for me, the domain object interactions are in the context of a transaction, so it's a matter of binding...
I'm using L2S, by the way. The Domain is completely isolated at this point, and currently the DataContext is at the Repository implementation level....
... ONE Order can be in Pending status at a time? Have a PendingOrder property on the Account object. When an order wants to change its status to pending, it...
... That is your problem.. changes should not happen in database. It should always go through the right aggregate root. That's why partitioning aggregate roots...
exactly, I mean two diff solutions: 1) eventually consistent: "Your purchase request is accepted. Please wait until it is approved." 2) strong consistency: use...
I think there is a misunderstanding here. The business rule we are talking about transcends my current instance of the Aggregate "Order". I agree that changes...
*2) strong consistency: use some kind of locking..* ** "map(Household,Product)->PurchasedCount and update this PurchasedCount always when we update/create...
"As Richard said above, for some rules you may have to check the entire history in order to evaluate a rule. You can't do that within the context of a single...
Cool, now about the isolation level, is this something that the Unit of Work pattern would help me with? Here is a brief overview of what I have, using L2S and...
... Yup, UoW. This is provided out of the box by NO. ... I presume L2S is "Linq to SQL"? I work with Java, but NO is available on .NET too; I understand...
Greetings! I am fairly new to DDD, and have been enjoying applying what I have learned so far. There is just one thing that I am having a bit of a problem...
I have some classes in my Domain Layer that seem to belong to the Application Layer. The classes involve recognizing products and vendors in user data against...
Gojko, How long will the evening be? I'd rather catch the train back the same night than overnight and get one in the morning. Regards, Ben Ellis _____ From:...