public static IMediaType BuildMediaTypeEntity(IShortStringHelper shortStringHelper, ContentTypeDto dto) { var contentType = new MediaType(shortStringHelper, dto.NodeDto.ParentId); try { contentType.DisableChangeTracking(); BuildCommonEntity(contentType, dto); // reset dirty initial properties (U4-1946) contentType.ResetDirtyProperties(false); } finally { contentType.EnableChangeTracking(); } return(contentType); }
public IMediaType BuildMediaTypeEntity(ContentTypeDto dto) { var contentType = new MediaType(dto.NodeDto.ParentId); try { contentType.DisableChangeTracking(); BuildCommonEntity(contentType, dto); //on initial construction we don't want to have dirty properties tracked // http://issues.umbraco.org/issue/U4-1946 contentType.ResetDirtyProperties(false); } finally { contentType.EnableChangeTracking(); } return(contentType); }