public ActionResult Create([Bind(Include = "meetingID,topic,description,date,startTime,endTime,trainerName,attendeeLimit")] CreateNewMeetingProgram createNewMeetingProgram) { if (ModelState.IsValid) { db.createNewMeetingPrograms.Add(createNewMeetingProgram); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(createNewMeetingProgram)); }
// GET: CreateNewMeetingProgram/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CreateNewMeetingProgram createNewMeetingProgram = db.createNewMeetingPrograms.Find(id); if (createNewMeetingProgram == null) { return(HttpNotFound()); } return(View(createNewMeetingProgram)); }