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