public ActionResult Edit(tbl_Job_SchoolType tbl_job_schooltype) { if (ModelState.IsValid) { db.tbl_Job_SchoolType.Attach(tbl_job_schooltype); db.ObjectStateManager.ChangeObjectState(tbl_job_schooltype, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Index"); } return View(tbl_job_schooltype); }
public ActionResult Create(tbl_Job_SchoolType tbl_job_schooltype) { if (ModelState.IsValid) { db.tbl_Job_SchoolType.AddObject(tbl_job_schooltype); db.SaveChanges(); return RedirectToAction("Index"); } return View(tbl_job_schooltype); }
/// <summary> /// Deprecated Method for adding a new object to the tbl_Job_SchoolType EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTotbl_Job_SchoolType(tbl_Job_SchoolType tbl_Job_SchoolType) { base.AddObject("tbl_Job_SchoolType", tbl_Job_SchoolType); }
/// <summary> /// Create a new tbl_Job_SchoolType object. /// </summary> /// <param name="stId">Initial value of the stId property.</param> /// <param name="stName_vn">Initial value of the stName_vn property.</param> public static tbl_Job_SchoolType Createtbl_Job_SchoolType(global::System.Int32 stId, global::System.String stName_vn) { tbl_Job_SchoolType tbl_Job_SchoolType = new tbl_Job_SchoolType(); tbl_Job_SchoolType.stId = stId; tbl_Job_SchoolType.stName_vn = stName_vn; return tbl_Job_SchoolType; }