コード例 #1
0
        public async Task <OrderDto> DeleteAsync(int id)
        {
            var order = await GetOrderByIdOrThrowAsync(id);

            _serviceOrderRepository.Delete(order);
            await SaveProvider.SaveAsync();

            return(Mapper.Map <OrderDto>(order));
        }
コード例 #2
0
 public async Task <IActionResult> Delete(Guid id)
 {
     if (await _repo.Delete(id))
     {
         return(Ok(true));
     }
     ;
     return(BadRequest("Could not delete the  Service Order"));
 }