public ActionResult Create(ConferenceAttendant ConferenceAttendant) { if (ModelState.IsValid) { db.ConferenceAttendants.AddObject(ConferenceAttendant); db.SaveChanges(); return RedirectToAction("Index", "Conference"); } return View(); }
public ActionResult Edit(ConferenceAttendant ConferenceAttendant) { if (ModelState.IsValid) { db.ConferenceAttendants.Attach(ConferenceAttendant); db.ObjectStateManager.ChangeObjectState(ConferenceAttendant, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Index", "Conference"); } return View(); }
/// <summary> /// Create a new ConferenceAttendant object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="conferenceID">Initial value of the ConferenceID property.</param> /// <param name="developerID">Initial value of the DeveloperID property.</param> public static ConferenceAttendant CreateConferenceAttendant(global::System.Int32 id, global::System.Int32 conferenceID, global::System.Int32 developerID) { ConferenceAttendant conferenceAttendant = new ConferenceAttendant(); conferenceAttendant.ID = id; conferenceAttendant.ConferenceID = conferenceID; conferenceAttendant.DeveloperID = developerID; return conferenceAttendant; }
/// <summary> /// Deprecated Method for adding a new object to the ConferenceAttendants EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToConferenceAttendants(ConferenceAttendant conferenceAttendant) { base.AddObject("ConferenceAttendants", conferenceAttendant); }