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