Esempio n. 1
0
        public Response FetchProductInfo(string ProductType)
        {
            var response = new Response();
            var productsRepo = new ProductsRepo();

            var product = productsRepo.GetProductInfo(ProductType);

            if (product == null)
            {
                response.Success = false;
                response.Message = "That product is not in our database.";
            }
            else
            {
                response.Success = true;
                response.ProductInfo = product;
            }

            return response;
        }
Esempio n. 2
0
 public List<Product> FetchProductsList()
 {
     var productsRepo = new ProductsRepo();
     return productsRepo.GetProductsList();
 }