public ActionResult Edit(Culture culture) { if (ModelState.IsValid) { db.Culture.Attach(culture); db.ObjectStateManager.ChangeObjectState(culture, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Logon", "Account"); } return View(culture); }
public ActionResult Create(Culture culture) { if (ModelState.IsValid) { db.Culture.AddObject(culture); db.SaveChanges(); return RedirectToAction("Logon", "Account"); } return View(culture); }
/// <summary> /// Create a new Culture object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="culture1">Initial value of the Culture1 property.</param> public static Culture CreateCulture(global::System.Int32 id, global::System.String culture1) { Culture culture = new Culture(); culture.Id = id; culture.Culture1 = culture1; return culture; }
/// <summary> /// Deprecated Method for adding a new object to the Culture EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCulture(Culture culture) { base.AddObject("Culture", culture); }