コード例 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProducts(Product product)
 {
     base.AddObject("Products", product);
 }
コード例 #2
0
 /// <summary>
 /// Create a new Product object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="categoryId">Initial value of the CategoryId property.</param>
 /// <param name="supplierId">Initial value of the SupplierId property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="unitPrice">Initial value of the UnitPrice property.</param>
 /// <param name="unitsInStock">Initial value of the UnitsInStock property.</param>
 public static Product CreateProduct(global::System.Int64 id, global::System.Int64 categoryId, global::System.Int64 supplierId, global::System.String name, global::System.Double unitPrice, global::System.Int32 unitsInStock)
 {
     Product product = new Product();
     product.Id = id;
     product.CategoryId = categoryId;
     product.SupplierId = supplierId;
     product.Name = name;
     product.UnitPrice = unitPrice;
     product.UnitsInStock = unitsInStock;
     return product;
 }