/// <summary> /// Create a new StoreProduct object. /// </summary> /// <param name="productID">Initial value of the ProductID property.</param> public static StoreProduct CreateStoreProduct(global::System.Int32 productID) { StoreProduct storeProduct = new StoreProduct(); storeProduct.ProductID = productID; return storeProduct; }
/// <summary> /// Deprecated Method for adding a new object to the StoreProducts EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToStoreProducts(StoreProduct storeProduct) { base.AddObject("StoreProducts", storeProduct); }
public static void Insert(Hashtable values) { DAL.StoreProduct R = new DAL.StoreProduct { Name = values["Name"].ToString(), Description = values["Description"].ToString(), CategoryID = int.Parse(values["CategoryID"].ToString()), Price = decimal.Parse(values["Price"].ToString()), Deleted = bool.Parse(values["Deleted"].ToString()), CreateDate = DateTime.Now, PortalID = Product.PortalID }; Utils.DbContext.AddToStoreProducts(R); Utils.DbContext.SaveChanges(); }