コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            var engineEntity = _engineRepository.GetWhere(x => x.Id == id).FirstOrDefault();

            _engineRepository.Delete(engineEntity);
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public IActionResult DeleteEngine(int id)
 {
     engineRepository.Delete(id);
     return(RedirectToAction("ListEngines"));
 }