开发者

Entity Framework Concurrency

开发者 https://www.devze.com 2023-01-11 06:45 出处:网络
I am developing application that works with sql server, I read and update data from (by) multiple sources.

I am developing application that works with sql server, I read and update data from (by) multiple sources.

B开发者_JAVA百科ecause of that, there is a problem that one updates already updated data....

How can I deal with that issue? (I know EF has built in Concurrency mode but if I understand right, if my design creates and disposes contextobject every time this won't work)


The secret is normally to use a timestamp field and check that against the value in your object before you commit to the db. There's an article about this subject here.

0

精彩评论

暂无评论...
验证码 换一张
取 消