public ActionResult DeletePollQuestion(PollQuestion question) { DBNLDataContext db = new DBNLDataContext(); db.PollQuestions.DeleteOnSubmit(question); db.SubmitChanges(); return RedirectToAction("ListPollQuestions"); }
public ActionResult EditPollQuestion(int id, PollQuestion question) { DBNLDataContext db = new DBNLDataContext(); PollQuestion updPollQuestion = db.PollQuestions.Where(p => p.Id == id).SingleOrDefault(); updPollQuestion.CreatedDate = question.CreatedDate; updPollQuestion.PollId = question.PollId; updPollQuestion.Status = question.Status; updPollQuestion.UpdatedDate = updPollQuestion.UpdatedDate; updPollQuestion.Question = question.Question; updPollQuestion.Responses = question.Responses; db.SubmitChanges(); return RedirectToAction("ListPollQuestions"); }
private void detach_PollQuestions(PollQuestion entity) { this.SendPropertyChanging(); entity.Poll = null; }
private void attach_PollQuestions(PollQuestion entity) { this.SendPropertyChanging(); entity.Poll = this; }
partial void DeletePollQuestion(PollQuestion instance);
partial void UpdatePollQuestion(PollQuestion instance);
partial void InsertPollQuestion(PollQuestion instance);