// GET: Transportadoras/Delete/5 public async Task <IActionResult> Delete(int?id) { if (id == null) { return(NotFound()); } var transportadora = await _transportadoraBusiness.ObtenerTransportadoraPorId(id.Value); if (transportadora == null) { return(NotFound()); } await _transportadoraBusiness.EliminarTransportadora(transportadora); return(View(transportadora)); }
// GET: Transportadoras/Delete/5 public async Task <IActionResult> Eliminar(int?id) { if (id == null) { return(NotFound()); } var transportadora = await _context.ObtenerTransportadoraPorId(id); if (transportadora == null) { return(NotFound()); } await _context.EliminarTransportadora(transportadora); return(RedirectToAction(nameof(Index))); }