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