public async Task <IActionResult> DeleteAsync(int id) { var result = await _courierService.DeleteAsync(id); if (!result.Success) { return(BadRequest(result.Message)); } var courierResource = _mapper.Map <Courier, CourierResource>(result.Courier); return(Ok(courierResource)); }