Exemplo n.º 1
0
        private Product ConvertProductEntityToProduct(
						ProductEntity productEntity)
        {
            Product product = new Product();
            product.ProductID = productEntity.ProductID;
            product.ProductName = productEntity.ProductName;
            product.QuantityPerUnit = productEntity.QuantityPerUnit;
            product.UnitPrice = (decimal)productEntity.UnitPrice;
            product.Discontinued = productEntity.Discontinued;
            return product;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductEntities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductEntities(ProductEntity productEntity)
 {
     base.AddObject("ProductEntities", productEntity);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new ProductEntity object.
 /// </summary>
 /// <param name="productID">Initial value of the ProductID property.</param>
 public static ProductEntity CreateProductEntity(global::System.Int32 productID)
 {
     ProductEntity productEntity = new ProductEntity();
     productEntity.ProductID = productID;
     return productEntity;
 }