/// <summary> /// Deprecated Method for adding a new object to the ProductSet EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProductSet(Product product) { base.AddObject("ProductSet", product); }
/// <summary> /// Create a new Product object. /// </summary> /// <param name="productId">Initial value of the ProductId property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="productNumber">Initial value of the ProductNumber property.</param> /// <param name="category">Initial value of the Category property.</param> /// <param name="quantityPerUnit">Initial value of the QuantityPerUnit property.</param> /// <param name="listUnitPrice">Initial value of the ListUnitPrice property.</param> /// <param name="unitsOnStock">Initial value of the UnitsOnStock property.</param> /// <param name="version">Initial value of the Version property.</param> public static Product CreateProduct(global::System.Int32 productId, global::System.String name, global::System.String productNumber, global::System.String category, global::System.Double quantityPerUnit, global::System.Decimal listUnitPrice, global::System.Int32 unitsOnStock, global::System.Byte[] version) { Product product = new Product(); product.ProductId = productId; product.Name = name; product.ProductNumber = productNumber; product.Category = category; product.QuantityPerUnit = quantityPerUnit; product.ListUnitPrice = listUnitPrice; product.UnitsOnStock = unitsOnStock; product.Version = version; return product; }