public async Task <IActionResult> DeleteCarrier([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var carrierToDelete = await _carrierService.GetCarrierAsync(id); if (carrierToDelete == null) { return(NotFound()); } await _carrierService.RemoveCarrierAsync(carrierToDelete); return(Ok()); }