예제 #1
0
        public ActionResult Delete(int id, FormCollection form)
        {
            var data = repo.All().Where(p => p.Id == id).FirstOrDefault();

            repo.Delete(data);
            repo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            客戶分類 category = categoryRepo.Find(id);

            categoryRepo.Delete(category);
            categoryRepo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }