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; }
/// <summary> /// Deprecated Method for adding a new object to the ProductEntities EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProductEntities(ProductEntity productEntity) { base.AddObject("ProductEntities", productEntity); }
/// <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; }