public static IDictionaryTranslation BuildEntity(LanguageTextDto dto, Guid uniqueId) { var item = new DictionaryTranslation(dto.LanguageId, dto.Value, uniqueId); try { item.DisableChangeTracking(); item.Id = dto.PrimaryKey; // reset dirty initial properties (U4-1946) item.ResetDirtyProperties(false); return(item); } finally { item.EnableChangeTracking(); } }
public IDictionaryTranslation BuildEntity(LanguageTextDto dto) { var item = new DictionaryTranslation(dto.LanguageId, dto.Value, _uniqueId); try { item.DisableChangeTracking(); item.Id = dto.PrimaryKey; //on initial construction we don't want to have dirty properties tracked // http://issues.umbraco.org/issue/U4-1946 item.ResetDirtyProperties(false); return(item); } finally { item.EnableChangeTracking(); } }