views:

50

answers:

1

I have a question from an interviewer:

If two users open the same page, one person adding 105 record and another person deleting the same record, what happens in this scenario?

How do I answer this?

+2  A: 

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.

Kyle Rozendo
+1 for the nice link.
rahul