public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here _trainRepository.Delete(id); return(RedirectToAction("DisplayTrains")); } catch { return(View("Error")); } }
public bool Delete(int?id) { return(_itrainrepository.Delete(id)); }
public void DeleteTrain(int id) { _trainRepository.Delete(id); }