Example #1
0
        // GET: ProductController
        public async Task <ActionResult> Index(string searchString)
        {
            var result = await _serviceProduct.GetAll();

            if (!String.IsNullOrEmpty(searchString))
            {
                result = result.Where(w => w.Description.ToUpper().Contains(searchString.ToUpper()));
            }


            return(View(result.ToList()));
        }
Example #2
0
 public IEnumerable <Product> Get()
 {
     return(_serviceProduct.GetAll());
 }
Example #3
0
        public IEnumerable <ProductDTO> Getall()
        {
            var products = serviceProduct.GetAll();

            return(mapperProduct.MapperListProductsDTO(products));
        }
Example #4
0
        public IEnumerable <ProductDto> GetAll()
        {
            var products = serviceProduct.GetAll();

            return(mapper.Map <IEnumerable <ProductDto> >(products));
        }
Example #5
0
        public IEnumerable <ProductDto> GetAll()
        {
            var products = serviceProduct.GetAll();

            return(mapperProduct.MapperListClientDto(products));
        }