public async Task <IActionResult> Delete(int id) { var value = await _valueRepository.GetValue(id); if (value == null) { return(NotFound()); } _valueRepository.Remove(value); await _unitOfWork.CompleteAsync(); return(NoContent()); }
public async Task DeleteValue(Value entity) { _valueRepository.Remove(entity); await _valueRepository.Complete(); }