public static IDictionaryItem BuildEntity(DictionaryDto dto)
    {
        var item = new DictionaryItem(dto.Parent, dto.Key);

        try
        {
            item.DisableChangeTracking();

            item.Id  = dto.PrimaryKey;
            item.Key = dto.UniqueId;

            // reset dirty initial properties (U4-1946)
            item.ResetDirtyProperties(false);
            return(item);
        }
        finally
        {
            item.EnableChangeTracking();
        }
    }
        public IDictionaryItem BuildEntity(DictionaryDto dto)
        {
            var item = new DictionaryItem(dto.Parent, dto.Key);

            try
            {
                item.DisableChangeTracking();

                item.Id  = dto.PrimaryKey;
                item.Key = dto.UniqueId;
                //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();
            }
        }