Esempio n. 1
0
        public async Task <BaseResponse <List <ProductDto> > > Handle(GetProductsRequest request, CancellationToken cancellationToken)
        {
            var response = new BaseResponse <List <ProductDto> >();

            var products = await _productRespository.GetList(p => !p.IsDeleted && p.IsActive);

            var productDtos = _mapper.Map <List <ProductDto> >(products);

            response.Data = productDtos;

            return(response);
        }
Esempio n. 2
0
 public IEnumerable <Product> GetListProduct(Expression <Func <Product, bool> > where)
 {
     return(_iRespository.GetList(where));
 }