예제 #1
0
 public ActionResult Category(Category obj)
 {
     DataManager db = new DataManager();
     Category old = db.GetCategory(obj.CategoryID);
     UpdateModel(old);
     db.Save();
     return RedirectToAction("List");
 }
예제 #2
0
 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&lt;T&gt; property instead.
 /// </summary>
 public void AddToCategories(Category category)
 {
     base.AddObject("Categories", category);
 }