IsDirty == True unexpectedly

IsDirty == True unexpectedly

Old forum URL: forums.lhotka.net/forums/t/12338.aspx


TSF posted on Wednesday, January 29, 2014

[CSLA 4.5.3 in a WinRT app.]

I've got a BusinessBase parent object that has three object properties: one BusinessBase, one BusinessListBase and one ReadOnlyListBase.

When I save the view, my VM does the following:

Model.ApplyEdit();
Model.MyBaseObject = await Model.MyBaseObject.SaveAsync();
Model.MyListBaseObject = await Model.MyListBaseObject.SaveAsync();

Everything saves fine; however, the Model.IsSelfDirty unexpectedly remains True. When I look at the individual object properties, each of them show IsDirty == False (as I would expect). The Model's EditLevel is also 0. The Model has no other properties that I've defined.

What am I missing? Thanks.

Tim

TSF replied on Wednesday, January 29, 2014

Sorry, it just occurred to me that I could (and need to) simply call Model.SaveAsync():

Model = await Model.SaveAsync();

Copyright (c) Marimer LLC