コード例 #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();
 }