From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books
Luc Morin, T.P. http://www.stlm.ca
I had the same issues with LINQ and the update. Found out LINQ only updates fields that have changed.
For example
var data = new mm_V2.DAL.LINQ.Person.House() { IDHouse = ReadProperty<Guid>(IDHouseProperty) }; data.rowversion = _rowversion; mgr.DataContext.Houses.Attach(data);
if (IsSelfDirty) { data.Description = ReadProperty<string>(DescriptionProperty); data.active = ReadProperty<bool>(ActiveProperty); }
So what was happening is the data.active field was initialized to false and then my ActivePropertywas false also.
When SubmitChanges was called LINQ looked at the field thought no change had happened and did not update this field. So this problem occured for me when setting data back to default values.
Got around it my reloading the original values from db
var data = mgr.DataContext.Houses.Single (p => p.IDHouse == ReadProperty<Guid>(IDHouseProperty)); data.rowversion = _rowversion; OnMemberReading(data);
Im taking an extra hit to the db but its not a real db intensive section so I am not concerned.