public async Task <OrderDto> DeleteAsync(int id) { var order = await GetOrderByIdOrThrowAsync(id); _serviceOrderRepository.Delete(order); await SaveProvider.SaveAsync(); return(Mapper.Map <OrderDto>(order)); }
public async Task <IActionResult> Delete(Guid id) { if (await _repo.Delete(id)) { return(Ok(true)); } ; return(BadRequest("Could not delete the Service Order")); }