Пример #1
0
        /// <summary>
        /// Gets the values from entity.
        /// </summary>
        /// <param name="entityDictionary">The entity dictionary containing property name <see cref="StorageItem"/>pairs..</param>
        internal void GetValuesFromEntity(Dictionary <string, StorageItem> entityDictionary)
        {
            ITrackOriginalValues _entity = (ITrackOriginalValues)this.TEntityGetter;

            foreach (var _ovx in _entity.OriginalValues)
            {
                StorageItem _storage = entityDictionary[_ovx.Key];
                _storage.GetValueFromEntity(_entity, (name, value) => MyListItem[name] = value);
            }
            MyListItem.Update();
            _entity.OriginalValues.Clear();
            EntityState = EntityState.Unchanged;
        }