示例#1
0
        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());
        }
示例#2
0
 public async Task DeleteValue(Value entity)
 {
     _valueRepository.Remove(entity);
     await _valueRepository.Complete();
 }