how to implement inventory control if using ORM?
-
Hi, I am needed to implement an inventory control module but should I apply ORM for it? For the case, if I create a change (e.g. transfer from one warehouse to another warehouse), then the loaded stock value may be change by other, so how to use ORM for this case? or should not use ORM for this case? Thanks
-
Hi, I am needed to implement an inventory control module but should I apply ORM for it? For the case, if I create a change (e.g. transfer from one warehouse to another warehouse), then the loaded stock value may be change by other, so how to use ORM for this case? or should not use ORM for this case? Thanks
I don't see any difference in using an ORM for this or not. ORM are just a kind of tool to prevent you from writing database access code (insert/delete/update). The question is not really clear. Maybe you could describe your requirements in more detail? Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
I don't see any difference in using an ORM for this or not. ORM are just a kind of tool to prevent you from writing database access code (insert/delete/update). The question is not really clear. Maybe you could describe your requirements in more detail? Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
In my thinking of using ORM for inventory control, it should be get a stock, minus the request quantity, and then update to the database. so if inventory = 6 pc a = 6, pc b = 6, then pc a request to remove 2 items and process the value = 4 and then update to db, but pc b keep the value = 6 and then remove 3 items, and the update to db, it seen to be value = 3 in the inventory, it's about the concurrency control, how to let it better? Thanks