Suppose I have code which retrieves an object and modifies it and submits it via any ORM from a web application. Below is the pseudo code:
var objCust = _dbContext.Customers.Where(c=>c.CustomerId == "ALFKI").SingleOrDefault(); objCust.Address ="test address 1"; //and add some orders _dbContext.SubmitChanges();
Second simultaneous request
var objCategory = _dbContext.Categories.Where(c=>c.CategoryId == 1).SingleOrDefault(); objCategoryName = "test name"; _dbContext.SubmitChanges();
How does the first request only grasp the changes done to customers and submit the changes. Is there any mechanism inbuilt in ORM's to track changes to entities per thread or request.