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