I have seen an example using the entiyt framework and it sued the ApplyPropertyChanges method to update an entity. Is there an equivilent method in plain old Linq-To-SQL?
My applicaiton is an asp.net MVC app and when I run my Edit action I want to just call sometihng like:
originalObject = GetObject(id);
DataContext.ApplyPropertyChanges(originalObject, updatedObject);
DataContext.SubmitChanges();
This method should do what you require:
You can try to use the Attach method but it is buggy. Please see this link as a reference: LINQ to SQL Update