public IEnumerable <Product> GetProductsBySubCateogoryId(int subCategoryId)
        {
            // TODO: Get Products from OAService filtered by sub category id and map (see mapping above) to the Product client Model (OAServer method: GetProductsbySubCategoryId)
            var dimProducts = oAService.GetProductsbySubCategoryId(subCategoryId);

            var products = (from p in dimProducts
                            select new Product()
            {
                Name = p.ModelName,
                ProductKey = p.ProductKey,
                StockLevel = p.SafetyStockLevel
            }).ToList();

            return(products);
        }
示例#2
0
 public DimProduct[] GetProductsbySubCategoryId(int subId)
 {
     return(_oAService.GetProductsbySubCategoryId(subId));
 }