public async Task AddCellAsync(Cell cell) { if (cell.Value != null && cell.Value != string.Empty) { _cellRepository.Add(cell); await _unitOfWork.SaveChangesAsync(); } }
public async Task ModifyCellAsync(Cell cell) { _cellRepository.Attach(cell); var entry = _unitOfWork.Entry(cell); if (cell.Value != null && cell.Value != string.Empty) { await this.SaveCellAsync(entry); } else { await this.RemoveCellAsync(entry); } }