예제 #1
0
        public ActionResult Delete(int Id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here
                db.deleteModel(Id);
                db.Remove(Id);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
예제 #2
0
 public ActionResult delete(int id)
 {
     obj.deleteModel(id);
     obj.save();
     return(RedirectToAction("Index"));
 }