public Task <List <Product> > Handle(GetAvailableProductsQuery request, CancellationToken cancellationToken) { return(_dbContext.Products .AsNoTracking() .Where(Product.AvailableSpec) .ToListAsync()); }
public async Task <IReadOnlyList <Product> > Handle(GetAvailableProductsQuery request, CancellationToken cancellationToken) { return(await _uow.ProductRepository.GetAvailableProductsAsync()); }