public void New(product p) { using (var ctx = new accountingEntities()) { PRODUCT = p; ctx.products.AddObject(p); ctx.SaveChanges(); } }
/// <summary> /// Create a new product object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static product Createproduct(global::System.Int32 id) { product product = new product(); product.ID = id; return product; }
/// <summary> /// Deprecated Method for adding a new object to the products EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToproducts(product product) { base.AddObject("products", product); }