public ActionResult Delete(ReaderDeleteViewModel model) { ReaderRepository repository = new ReaderRepository(); if (model.Id.ToString() != String.Empty) { repository.Delete(model.Id); } return(RedirectToAction("Index")); }
public ActionResult Delete(Reader model) { ReaderRepository repository = new ReaderRepository(AppConfig.ConnectionString); if (model.Id.ToString() != String.Empty) { repository.Delete(model.Id); } return(RedirectToAction("Index")); }