public ActionResult DeleteConfirmed(int id) { var engineEntity = _engineRepository.GetWhere(x => x.Id == id).FirstOrDefault(); _engineRepository.Delete(engineEntity); return(RedirectToAction("Index")); }
public IActionResult DeleteEngine(int id) { engineRepository.Delete(id); return(RedirectToAction("ListEngines")); }