diff --git a/src/Umbraco.Core/Models/EntityBase/IUmbracoEntity.cs b/src/Umbraco.Core/Models/EntityBase/IUmbracoEntity.cs index 397f4518a9..35f1955a61 100644 --- a/src/Umbraco.Core/Models/EntityBase/IUmbracoEntity.cs +++ b/src/Umbraco.Core/Models/EntityBase/IUmbracoEntity.cs @@ -2,7 +2,7 @@ namespace Umbraco.Core.Models.EntityBase { - public interface IUmbracoEntity : IAggregateRoot + public interface IUmbracoEntity : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { /// /// Profile of the user who created this Entity diff --git a/src/Umbraco.Core/Models/IDictionaryItem.cs b/src/Umbraco.Core/Models/IDictionaryItem.cs index 4f457e97a4..e10a80e831 100644 --- a/src/Umbraco.Core/Models/IDictionaryItem.cs +++ b/src/Umbraco.Core/Models/IDictionaryItem.cs @@ -6,7 +6,7 @@ using Umbraco.Core.Persistence.Mappers; namespace Umbraco.Core.Models { - public interface IDictionaryItem : IAggregateRoot + public interface IDictionaryItem : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { /// /// Gets or Sets the Parent Id of the Dictionary Item diff --git a/src/Umbraco.Core/Models/ILanguage.cs b/src/Umbraco.Core/Models/ILanguage.cs index cab97c7eb7..acd1de10c3 100644 --- a/src/Umbraco.Core/Models/ILanguage.cs +++ b/src/Umbraco.Core/Models/ILanguage.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Persistence.Mappers; namespace Umbraco.Core.Models { - public interface ILanguage : IAggregateRoot + public interface ILanguage : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { /// /// Gets or sets the Iso Code for the Language diff --git a/src/Umbraco.Core/Models/IMacro.cs b/src/Umbraco.Core/Models/IMacro.cs index f28160c345..4f366ad628 100644 --- a/src/Umbraco.Core/Models/IMacro.cs +++ b/src/Umbraco.Core/Models/IMacro.cs @@ -7,7 +7,7 @@ namespace Umbraco.Core.Models /// /// Defines a Macro /// - public interface IMacro : IAggregateRoot + public interface IMacro : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { /// /// Gets or sets the alias of the Macro diff --git a/src/Umbraco.Core/Models/IMemberGroup.cs b/src/Umbraco.Core/Models/IMemberGroup.cs index 5c3741997b..89f1c6c1cf 100644 --- a/src/Umbraco.Core/Models/IMemberGroup.cs +++ b/src/Umbraco.Core/Models/IMemberGroup.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Models /// /// Represents a member type /// - public interface IMemberGroup : IAggregateRoot + public interface IMemberGroup : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { /// /// The name of the member group diff --git a/src/Umbraco.Core/Models/IRelation.cs b/src/Umbraco.Core/Models/IRelation.cs index 2c24fdfad3..ac37d4293a 100644 --- a/src/Umbraco.Core/Models/IRelation.cs +++ b/src/Umbraco.Core/Models/IRelation.cs @@ -3,7 +3,7 @@ using Umbraco.Core.Models.EntityBase; namespace Umbraco.Core.Models { - public interface IRelation : IAggregateRoot + public interface IRelation : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { /// /// Gets or sets the Parent Id of the Relation (Source) diff --git a/src/Umbraco.Core/Models/IRelationType.cs b/src/Umbraco.Core/Models/IRelationType.cs index adb751080e..265e7723e5 100644 --- a/src/Umbraco.Core/Models/IRelationType.cs +++ b/src/Umbraco.Core/Models/IRelationType.cs @@ -4,7 +4,7 @@ using Umbraco.Core.Models.EntityBase; namespace Umbraco.Core.Models { - public interface IRelationType : IAggregateRoot + public interface IRelationType : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { /// /// Gets or sets the Name of the RelationType diff --git a/src/Umbraco.Core/Models/ITag.cs b/src/Umbraco.Core/Models/ITag.cs index 53b23d65c5..d132e0fbd7 100644 --- a/src/Umbraco.Core/Models/ITag.cs +++ b/src/Umbraco.Core/Models/ITag.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Models /// /// Represents a Tag, which is composed of a Text, Group and NodeCount property. /// - public interface ITag : IAggregateRoot + public interface ITag : IAggregateRoot, IRememberBeingDirty, ICanBeDirty { [DataMember] string Text { get; set; } diff --git a/src/Umbraco.Core/Models/ITemplate.cs b/src/Umbraco.Core/Models/ITemplate.cs index 7fb4eac4cf..33c80338b2 100644 --- a/src/Umbraco.Core/Models/ITemplate.cs +++ b/src/Umbraco.Core/Models/ITemplate.cs @@ -1,9 +1,11 @@ -namespace Umbraco.Core.Models +using Umbraco.Core.Models.EntityBase; + +namespace Umbraco.Core.Models { /// /// Defines a Template File (Masterpage or Mvc View) /// - public interface ITemplate : IFile + public interface ITemplate : IFile, IRememberBeingDirty, ICanBeDirty { /// /// Returns the that corresponds to the template file diff --git a/src/Umbraco.Core/Models/Membership/IUser.cs b/src/Umbraco.Core/Models/Membership/IUser.cs index 46338c8c4a..3601f22770 100644 --- a/src/Umbraco.Core/Models/Membership/IUser.cs +++ b/src/Umbraco.Core/Models/Membership/IUser.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Persistence.Mappers; namespace Umbraco.Core.Models.Membership @@ -7,7 +8,7 @@ namespace Umbraco.Core.Models.Membership /// Defines the interface for a /// /// Will be left internal until a proper Membership implementation is part of the roadmap - public interface IUser : IMembershipUser + public interface IUser : IMembershipUser, IRememberBeingDirty, ICanBeDirty { string Name { get; set; } int SessionTimeout { get; set; } diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs index 7b541359e8..2533fe62e8 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs @@ -291,7 +291,7 @@ AND umbracoNode.id <> @id", } } - if (((ICanBeDirty)entity).IsPropertyDirty("PropertyGroups") || + if (entity.IsPropertyDirty("PropertyGroups") || entity.PropertyGroups.Any(x => x.IsDirty())) { //Delete Tabs/Groups by excepting entries from db with entries from collections @@ -355,7 +355,7 @@ AND umbracoNode.id <> @id", } //If a Composition is removed we need to update/reset references to the PropertyGroups on that ContentType - if (((ICanBeDirty)entity).IsPropertyDirty("ContentTypeComposition") && + if (entity.IsPropertyDirty("ContentTypeComposition") && compositionBase != null && compositionBase.RemovedContentTypeKeyTracker != null && compositionBase.RemovedContentTypeKeyTracker.Any()) diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs index 292a14215d..898cf904ee 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs @@ -201,7 +201,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Insert(new DocumentTypeDto { ContentTypeNodeId = entity.Id, TemplateNodeId = template.Id, IsDefault = false }); } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IContentType entity) @@ -212,7 +212,7 @@ namespace Umbraco.Core.Persistence.Repositories ((ContentType)entity).UpdatingEntity(); //Look up parent to get and set the correct Path if ParentId has changed - if (((ICanBeDirty)entity).IsPropertyDirty("ParentId")) + if (entity.IsPropertyDirty("ParentId")) { var parent = Database.First("WHERE id = @ParentId", new { ParentId = entity.ParentId }); entity.Path = string.Concat(parent.Path, ",", entity.Id); @@ -243,7 +243,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Insert(new DocumentTypeDto { ContentTypeNodeId = entity.Id, TemplateNodeId = template.Id, IsDefault = false }); } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs b/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs index 7bcf684b4c..017bb3aeea 100644 --- a/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs @@ -195,7 +195,7 @@ WHERE umbracoNode." + SqlSyntaxContext.SqlSyntaxProvider.GetQuotedColumnName("te dto.DataTypeId = nodeDto.NodeId; Database.Insert(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IDataTypeDefinition entity) @@ -216,7 +216,7 @@ AND umbracoNode.id <> @id", ((DataTypeDefinition)entity).UpdatingEntity(); //Look up parent to get and set the correct Path if ParentId has changed - if (((ICanBeDirty)entity).IsPropertyDirty("ParentId")) + if (entity.IsPropertyDirty("ParentId")) { var parent = Database.First("WHERE id = @ParentId", new { ParentId = entity.ParentId }); entity.Path = string.Concat(parent.Path, ",", entity.Id); @@ -239,7 +239,7 @@ AND umbracoNode.id <> @id", Database.Update(nodeDto); Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistDeletedItem(IDataTypeDefinition entity) diff --git a/src/Umbraco.Core/Persistence/Repositories/DictionaryRepository.cs b/src/Umbraco.Core/Persistence/Repositories/DictionaryRepository.cs index 2609231c63..e29d24db32 100644 --- a/src/Umbraco.Core/Persistence/Repositories/DictionaryRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/DictionaryRepository.cs @@ -163,7 +163,7 @@ namespace Umbraco.Core.Persistence.Repositories translation.Key = entity.Key; } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IDictionaryItem entity) @@ -193,7 +193,7 @@ namespace Umbraco.Core.Persistence.Repositories } } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistDeletedItem(IDictionaryItem entity) diff --git a/src/Umbraco.Core/Persistence/Repositories/LanguageRepository.cs b/src/Umbraco.Core/Persistence/Repositories/LanguageRepository.cs index 0c891d512d..affe05e805 100644 --- a/src/Umbraco.Core/Persistence/Repositories/LanguageRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/LanguageRepository.cs @@ -126,7 +126,7 @@ namespace Umbraco.Core.Persistence.Repositories var id = Convert.ToInt32(Database.Insert(dto)); entity.Id = id; - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(ILanguage entity) @@ -138,7 +138,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/MacroRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MacroRepository.cs index f8c6955ada..1e05d88f2c 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MacroRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MacroRepository.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.Persistence.Repositories entity.Properties[propDto.Alias].Id = propId; } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IMacro entity) @@ -211,7 +211,7 @@ namespace Umbraco.Core.Persistence.Repositories } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } //public IEnumerable GetAll(params string[] aliases) diff --git a/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs index cda663b9f2..ab01af1aff 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs @@ -267,7 +267,7 @@ namespace Umbraco.Core.Persistence.Repositories UpdatePropertyTags(entity, _tagRepository); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IMedia entity) @@ -282,7 +282,7 @@ namespace Umbraco.Core.Persistence.Repositories entity.SanitizeEntityPropertiesForXmlStorage(); //Look up parent to get and set the correct Path and update SortOrder if ParentId has changed - if (((ICanBeDirty)entity).IsPropertyDirty("ParentId")) + if (entity.IsPropertyDirty("ParentId")) { var parent = Database.First("WHERE id = @ParentId", new { ParentId = entity.ParentId }); entity.Path = string.Concat(parent.Path, ",", entity.Id); @@ -349,7 +349,7 @@ namespace Umbraco.Core.Persistence.Repositories UpdatePropertyTags(entity, _tagRepository); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs index d007d49538..812db11462 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs @@ -152,7 +152,7 @@ namespace Umbraco.Core.Persistence.Repositories PersistNewBaseContentType(dto, entity); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IMediaType entity) @@ -163,7 +163,7 @@ namespace Umbraco.Core.Persistence.Repositories ((MediaType)entity).UpdatingEntity(); //Look up parent to get and set the correct Path if ParentId has changed - if (((ICanBeDirty)entity).IsPropertyDirty("ParentId")) + if (entity.IsPropertyDirty("ParentId")) { var parent = Database.First("WHERE id = @ParentId", new { ParentId = entity.ParentId }); entity.Path = string.Concat(parent.Path, ",", entity.Id); @@ -180,7 +180,7 @@ namespace Umbraco.Core.Persistence.Repositories PersistUpdatedBaseContentType(dto, entity); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs index 041d0ee622..55af5552cd 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs @@ -136,7 +136,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } public IMemberGroup GetByName(string name) diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs index fb1ba51188..eb790fa986 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs @@ -192,7 +192,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Insert(memberTypeDto); } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IMemberType entity) @@ -203,7 +203,7 @@ namespace Umbraco.Core.Persistence.Repositories ((MemberType)entity).UpdatingEntity(); //Look up parent to get and set the correct Path if ParentId has changed - if (((ICanBeDirty)entity).IsPropertyDirty("ParentId")) + if (entity.IsPropertyDirty("ParentId")) { var parent = Database.First("WHERE id = @ParentId", new { ParentId = entity.ParentId }); entity.Path = string.Concat(parent.Path, ",", entity.Id); @@ -232,7 +232,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Insert(memberTypeDto); } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/RelationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/RelationRepository.cs index 9858b921f7..8d5e0d7a8a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/RelationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/RelationRepository.cs @@ -133,7 +133,7 @@ namespace Umbraco.Core.Persistence.Repositories var id = Convert.ToInt32(Database.Insert(dto)); entity.Id = id; - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IRelation entity) @@ -144,7 +144,7 @@ namespace Umbraco.Core.Persistence.Repositories var dto = factory.BuildDto(entity); Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/RelationTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/RelationTypeRepository.cs index d4249b605e..8763fcddbf 100644 --- a/src/Umbraco.Core/Persistence/Repositories/RelationTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/RelationTypeRepository.cs @@ -126,7 +126,7 @@ namespace Umbraco.Core.Persistence.Repositories var id = Convert.ToInt32(Database.Insert(dto)); entity.Id = id; - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IRelationType entity) @@ -137,7 +137,7 @@ namespace Umbraco.Core.Persistence.Repositories var dto = factory.BuildDto(entity); Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/ServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ServerRegistrationRepository.cs index f2df870e02..410bbe1585 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ServerRegistrationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ServerRegistrationRepository.cs @@ -105,7 +105,7 @@ namespace Umbraco.Core.Persistence.Repositories protected override void PersistNewItem(ServerRegistration entity) { - ((Entity)entity).AddingEntity(); + entity.AddingEntity(); var factory = new ServerRegistrationFactory(); var dto = factory.BuildDto(entity); @@ -113,19 +113,19 @@ namespace Umbraco.Core.Persistence.Repositories var id = Convert.ToInt32(Database.Insert(dto)); entity.Id = id; - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(ServerRegistration entity) { - ((Entity)entity).UpdatingEntity(); + entity.UpdatingEntity(); var factory = new ServerRegistrationFactory(); var dto = factory.BuildDto(entity); Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } } diff --git a/src/Umbraco.Core/Persistence/Repositories/TagRepository.cs b/src/Umbraco.Core/Persistence/Repositories/TagRepository.cs index fe4fcc7d79..344d9f4c43 100644 --- a/src/Umbraco.Core/Persistence/Repositories/TagRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/TagRepository.cs @@ -146,7 +146,7 @@ namespace Umbraco.Core.Persistence.Repositories var id = Convert.ToInt32(Database.Insert(dto)); entity.Id = id; - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(ITag entity) @@ -158,7 +158,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } //TODO: Consider caching implications. diff --git a/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs index aac21682c1..c529a236c3 100644 --- a/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs @@ -199,7 +199,7 @@ namespace Umbraco.Core.Persistence.Repositories } //Look up parent to get and set the correct Path if ParentId has changed - if (((ICanBeDirty)entity).IsPropertyDirty("ParentId")) + if (entity.IsPropertyDirty("ParentId")) { var parent = Database.First("WHERE id = @ParentId", new { ParentId = ((Template)entity).ParentId }); entity.Path = string.Concat(parent.Path, ",", entity.Id); @@ -222,7 +222,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Update(dto.NodeDto); Database.Update(dto); - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistDeletedItem(ITemplate entity) diff --git a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs index 9d99ef4309..c08802f6e0 100644 --- a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.Persistence.Repositories Database.Insert(sectionDto); } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IUser entity) @@ -229,7 +229,7 @@ namespace Umbraco.Core.Persistence.Repositories } - ((ICanBeDirty)entity).ResetDirtyProperties(); + entity.ResetDirtyProperties(); } #endregion