Using IRememberBeingDirty and WasDirty with Members and Properties
Hey
I update a property on a member from within the CMS and when MemberService.Saved event is triggered the member appears as dirty, but the property only appears as dirty in the entity.Properties collection. Using .WasPropertyDirty("alias") returns false.
Am I missing something?
private static void MemberServiceSaved(IMemberService sender, SaveEventArgs<IMember> e)
{
foreach (var entity in e.SavedEntities)
{
var member = (IRememberBeingDirty)entity;
// true
var wasMemberDirty = member.WasDirty();
// false
var propOneWasDirty = member.WasPropertyDirty("propOneAlias")
// true
var propOneWasDirtyByEntity = entity.Properties["propOneAlias"].WasDirty();
}
}
Using IRememberBeingDirty and WasDirty with Members and Properties
Hey
I update a property on a member from within the CMS and when MemberService.Saved event is triggered the member appears as dirty, but the property only appears as dirty in the entity.Properties collection. Using .WasPropertyDirty("alias") returns false.
Am I missing something?
Lewis
Also found this on the issue tracker: http://issues.umbraco.org/issue/U4-6035
Has anyone had experience using these properties successfully?
You can see below that the node is marked as dirty but the property in question is not.
is working on a reply...