c# - concurrency Control for inserting records based on previous transaction -


i having situation in have make entries tablea tableb such need counter-balance entries. example: tablea id name 1 2 b 3 c if no entries in tableb of table user,i add entries in tablea user1 as

id  tablea_id   userid 1       1       1 2       2       1    3       3       1 

for anther user user2, need check entries of lastuser , find out entry made first. entry made first made @ last next user. as

id    tablea_id   userid 1         1         1 2         2         1    3         3         1 4         2         2 5         3         2    6         1         2 

similiar next user enteries

7         3         3 8         1         3    9         2         3 

problem here users may request @ same time , need implement locking mechanism handle it. user's request, need find entries last user. table must locked until user makes entries in tableb. in short want control concurrency. please suggest how implement it. better if not effect entries tablec tableb.


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -