/// <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);
 }
Esempio n. 2
0
 public int insertNewCategory(String catDesc)
 {
     category cat = new category();
     cat.catDesc = catDesc;
     Context.AddTocategories(cat);
     saveChanges();
     return cat.catID;
 }
 /// <summary>
 /// Create a new category object.
 /// </summary>
 /// <param name="catID">Initial value of the catID property.</param>
 /// <param name="catDesc">Initial value of the catDesc property.</param>
 public static category Createcategory(global::System.Int32 catID, global::System.String catDesc)
 {
     category category = new category();
     category.catID = catID;
     category.catDesc = catDesc;
     return category;
 }