public ActionResult Delete(string id) { try { _carrierService.Delete(id); TempData["AlertSuccess"] = "Operation Done!"; } catch (Exception e) { this.ModelState.AddModelError("CustomError", e.Message); } return(RedirectToAction("Index")); }
public IActionResult DeleteConfirmed(int id) { log.Info(nameof(DeleteConfirmed) + ":Post"); try { carrierService.Delete(id); } catch (Exception e) { log.Error(e); return(BadRequest()); } return(RedirectToAction(nameof(Index))); }
public bool Delete(int id) { return(_carrierService.Delete(id)); }
public bool Delete(Guid CarrierId) { return(CarrierService.Delete(EmployeeEntity, CarrierId)); }