Exemple #1
0
 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);
 }
Exemple #2
0
        public ActionResult Create(Culture culture)
        {
            if (ModelState.IsValid)
            {
                db.Culture.AddObject(culture);
                db.SaveChanges();
                return RedirectToAction("Logon", "Account");
            }

            return View(culture);
        }
Exemple #3
0
 /// <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;
 }
Exemple #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Culture EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCulture(Culture culture)
 {
     base.AddObject("Culture", culture);
 }