public ActionResult Category(Category obj) { DataManager db = new DataManager(); Category old = db.GetCategory(obj.CategoryID); UpdateModel(old); db.Save(); return RedirectToAction("List"); }
public void SaveCategory(Category obj) { Category old = GetCategory(obj.CategoryID); old.Title = obj.Title; }
/// <summary> /// Create a new Category object. /// </summary> /// <param name="categoryID">Initial value of the CategoryID property.</param> /// <param name="title">Initial value of the Title property.</param> public static Category CreateCategory(global::System.Guid categoryID, global::System.String title) { Category category = new Category(); category.CategoryID = categoryID; category.Title = title; return category; }
/// <summary> /// Deprecated Method for adding a new object to the Categories EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCategories(Category category) { base.AddObject("Categories", category); }