// 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())); }
public IEnumerable <Product> Get() { return(_serviceProduct.GetAll()); }
public IEnumerable <ProductDTO> Getall() { var products = serviceProduct.GetAll(); return(mapperProduct.MapperListProductsDTO(products)); }
public IEnumerable <ProductDto> GetAll() { var products = serviceProduct.GetAll(); return(mapper.Map <IEnumerable <ProductDto> >(products)); }
public IEnumerable <ProductDto> GetAll() { var products = serviceProduct.GetAll(); return(mapperProduct.MapperListClientDto(products)); }