/// <summary> /// Create a new section object. /// </summary> /// <param name="sectionId">Initial value of the sectionId property.</param> public static section Createsection(global::System.Int32 sectionId) { section section = new section(); section.sectionId = sectionId; return section; }
/// <summary> /// Deprecated Method for adding a new object to the sections EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTosections(section section) { base.AddObject("sections", section); }
public ActionResult viewadd(int id, section obj) { if (Session["id"] == null) return RedirectToAction("signin", "Home"); DAO.sections.AddObject(obj); DAO.SaveChanges(); return RedirectToAction("index"); }