public IList<Model.Product> FindAll()
 {
     var products = new ShopDataContext().Products
         .Select(prod => new Model.Product
                             {
                                 Id = prod.ProductId,
                                 Name = prod.ProductName,
                                 Price = new Price(prod.RRP, prod.SellingPrice)
                             });
     return products.ToList();
 }
예제 #2
0
        public IList <Model.Product> FindAll()
        {
            var products = new ShopDataContext().Products
                           .Select(prod => new Model.Product
            {
                Id    = prod.ProductId,
                Name  = prod.ProductName,
                Price = new Price(prod.RRP, prod.SellingPrice)
            });

            return(products.ToList());
        }