Another issue is that my LINQ dbml files had conversion issues, showing the error:
"There is no Unicode byte order mark. Cannot switch to Unicode." The fix was just to remove the encoding attibute in the XML document description:
<?xml version="1.0" encoding="utf-16"?>
public bool Run(ChangeSet changedObjects)
{
List<trackedobject> tracked = new List<trackedobject>();
foreach (object o in changedObjects.AddedEntities)
tracked.Add(new TrackedObject { Current = o, IsNew = true });
foreach (object o in changedObjects.ModifiedEntities)
tracked.Add(new TrackedObject { Current = o, IsChanged = true });
foreach (object o in changedObjects.RemovedEntities)
tracked.Add(new TrackedObject { Current = o, IsDeleted = true });
return Run(tracked);
}
needs to change to:
public bool Run(ChangeSet changedObjects)
{
List<TrackedObject> tracked = new List<TrackedObject>();
foreach (object o in changedObjects.Inserts)
tracked.Add(new TrackedObject { Current = o, IsNew = true });
foreach (object o in changedObjects.Updates)
tracked.Add(new TrackedObject { Current = o, IsChanged = true });
foreach (object o in changedObjects.Deletes)
tracked.Add(new TrackedObject { Current = o, IsDeleted = true });
return Run(tracked);
}
No comments:
Post a Comment