Exemplo 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;
        }
Exemplo n.º 2
0
 public List<Product> FetchProductsList()
 {
     var productsRepo = new ProductsRepo();
     return productsRepo.GetProductsList();
 }