Data Access has been discontinued. Please refer to this page for more information.

How to: Update Objects

Performing an update operation is an extremely simple operation. You need a reference to an existing object in the database. Once you have it, just update its properties and invoke the well-known SaveChanges method.

Customer customerToUpdate = dbContext.Customers.First();
customerToUpdate.Fax = "[newFax]";
Dim customerToUpdate As Customer = dbContext.Customers.First()
customerToUpdate.Fax = "[newFax]"