// // GET: /Graduation/ public ActionResult RSVP(string Id) { Attendee RsvpAttendee = new Attendee(); using (GraduationEntities ents = new GraduationEntities()) { RsvpAttendee = ents.Attendees.Where(x => x.UID == Id).Single(); } return View("Index", RsvpAttendee); }
public void SubmitRsvp(RSVP RsvpData) { Attendee person = new Attendee(); using (GraduationEntities ents = new GraduationEntities()) { ents.RSVPs.Add(RsvpData); person = ents.Attendees.Where(x => x.Id == RsvpData.AttendeeId).Single(); ents.SaveChanges(); } }