Пример #1
0
        public Product GetProductByName(string name)
        {
            var query = from p in ProductMapper.GetAllProducts()
                        where p.ProductType == name
                        select p;

            return(query.FirstOrDefault());
        }
Пример #2
0
 public IEnumerable <Product> GetAllProducts()
 {
     return(ProductMapper.GetAllProducts());
 }