开发者

DB Operations in asp.net with c#

I have a question from an interviewer:

If two users open the same page, one person adding 105 record and another person deleti开发者_Python百科ng the same record, what happens in this scenario?

How do I answer this?


That's a bit odd, as the records would not be there yet to delete if this was simultaneous access. Anywho, I am sure they are looking at Concurrency, and probably Optimistic Concurrency.

Have a look at this page, showing how to implement Optimistic Concurrency with ASP.NET.


Potential conflicts are resolved in two places. First, on the web tier, using locking to make sure that each request is looking at consistent data.

Second, at the database tier, using transactions.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜