c# - Where are order IDs allocated? -


Sorry for the simple question; I am still working on understanding the DDD. Let's say I have a IOrderService . Is this the place where I will have a method GetNewOrderID ? Or, I think more generally, what is the correct way to allocate new orders in the DDD scenario?

I like to hear words that use business. If they talk, for example, when ordering orders and phone orders are the source of both orders, I may have to order from an order rather than an OrderSitterSer or IOrderSource - instead of the previous business-speaking code-speaks

If business people talk about obtaining an ID from their service, then I can have two implementations or only one, who uses the identifier to say "this is from the phone".

So yes, do this, it is likely to be more, though they talk about getting an order from order sensor, sending it to the warehouse or forming an order form and getting the reference number. Can be the primary key from, but maybe this is not an ID.

The language of the business can guide you to writing software that matches their process well. Keep things easy to change and if you have any aspect of the domain that can use some learning, then helps you to move. Design patterns are all the same you use; I just do not call my code after those people, if there are some better rules of business, see DDD's omnipresent language and good luck!


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -