コード例 #1
0
        public ActionResult Delete(ReaderDeleteViewModel model)
        {
            ReaderRepository repository = new ReaderRepository();

            if (model.Id.ToString() != String.Empty)
            {
                repository.Delete(model.Id);
            }

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public ActionResult Delete(Reader model)
        {
            ReaderRepository repository = new ReaderRepository(AppConfig.ConnectionString);

            if (model.Id.ToString() != String.Empty)
            {
                repository.Delete(model.Id);
            }


            return(RedirectToAction("Index"));
        }