Skip to content

Commit

Permalink
* add overload update method in edit repository
Browse files Browse the repository at this point in the history
  • Loading branch information
vahpetr committed Dec 5, 2015
1 parent caf793f commit dbb5f3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Repositories/Contract/IEditRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public interface IEditRepository<TEntity>
/// <param name="expressions">Свойства</param>
void Modified(TEntity entity, params Expression<Func<TEntity, object>>[] expressions);

/// <summary>
/// Обновить граф сущности
/// </summary>
/// <param name="currEntity">Обновляемый граф сущности</param>
/// <param name="prevEntity">Текущая сущьность</param>
void Update(TEntity currEntity, TEntity prevEntity);

/// <summary>
/// Обновить граф сущности
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Services/EditService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Task AddAsync(TEntity entity)
/// <param name="prevEntity">Сущность из базы данных</param>
public virtual void Update(TEntity currEntity, TEntity prevEntity)
{
repository.Value.Update(currEntity);
repository.Value.Update(currEntity, prevEntity);
}

/// <summary>
Expand Down

0 comments on commit dbb5f3f

Please sign in to comment.