コード例 #1
0
 public ActionResult EditPoll(int id, Poll poll)
 {
     DBNLDataContext db = new DBNLDataContext();
     Poll updPoll = db.Polls.Where(p => p.Id == id).SingleOrDefault();
     updPoll.PollName = poll.PollName;
     updPoll.Status = poll.Status;
     db.SubmitChanges();
     return RedirectToAction("ListPolls");
 }
コード例 #2
0
 public ActionResult DeletePoll(Poll poll)
 {
     DBNLDataContext db = new DBNLDataContext();
     db.Polls.DeleteOnSubmit(poll);
     db.SubmitChanges();
     return RedirectToAction("ListPolls");
 }
コード例 #3
0
 partial void UpdatePoll(Poll instance);
コード例 #4
0
 partial void DeletePoll(Poll instance);
コード例 #5
0
 partial void InsertPoll(Poll instance);