Tutorial by Examples: asnotracking

Bad Example: var location = dbContext.Location .Where(l => l.Location.ID == location_ID) .SingleOrDefault(); return location; Since the above code is simply returning an entity without modifying or adding it, we can avoid tracking cost. Good Ex...

Page 1 of 1