public ActionResult Delete(long id) { var model = new DeleteLocomotiveModel() { Id = id }; return(View(model)); }
public ActionResult Delete(DeleteLocomotiveModel model) { _repository.Remove(model.Id); return(RedirectToAction("List")); }