Question: How do I keep the SubSonic objects dirty when they go back and forth through the Windows Communication Foundation service?
In particular:
I have a WCF service call that returns a collection of SubSonic (2.2) objects, for example:
public MyObjectCollection GetAllMyObjects()
{
return DB.Select().From<MyObject>.ExecuteAsCollection<MyObjectCollection>();
}
and another that allows the client to save them:
public void SaveAllMyObjects(MyObjectCollection objs)
{
objs.SaveAll();
}
On the WCF client side, I retrieve this collection (via the generated WCF proxy), I change some of its elements, and then I save it:
MyObject[] allObjects = myWcfClient.GetAllMyObjects();
allObjects[3].SomeProperty = "Some other value";
myWcfClient.SaveAllMyObjects(allObjects);
However, what happens is that calling "objs.SaveAll () SubSonic does not save anything, because it does not" understand "that objs [3] has been changed, that is, no one has flipped the dirty bit in this column.
-, , ? , SubSonic , WCF?