public IDbPropertyValuesBase Clone() { MockDbPropertyValues clone = new MockDbPropertyValues(); foreach (string key in _properties.Keys) { clone[key] = _properties[key]; } return(clone); }
public MockDbEntityEntry(TEntity entity) { _entity = entity; _originalPropertyValues = new MockDbPropertyValues(); _currentPropertyValues = new MockDbPropertyValues(); PropertyInfo[] properties = typeof(TEntity).GetProperties(BindingFlags.Public); foreach (PropertyInfo propertyInfo in properties) { object value = propertyInfo.GetValue(_entity); _originalPropertyValues[propertyInfo.Name] = value; _currentPropertyValues[propertyInfo.Name] = value; } }