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