Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to implement inventory control if using ORM?

how to implement inventory control if using ORM?

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    calendarw
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • C calendarw

      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

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      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.

      C 1 Reply Last reply
      0
      • S SeMartens

        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.

        C Offline
        C Offline
        calendarw
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups