KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Lets say I query the database and load a list of items. Then I open one of the items in a detail view form, and instead of re-querying the item out of the database, I create an instance of the item from the datasource in the list. Is there a way I can update the database record without fetching the record of the individual item? Here is a sample how I am doing it now: dataItem itemToUpdate = (from t in dataEntity.items where t.id == id select t).FirstOrDefault(); Then after pulling the record I update some values in the item and push the record back: itemToUpdate.itemstatus = newStatus; dataEntity.SaveChanges(); I would think there would be a better way to do this, any ideas?
Tags (comma-separated)
Save Edits
Cancel