public async Task <PagedResult <OrganizationDto> > Handle(GetOrganizationPagedListQuery request, CancellationToken cancellationToken) { var organization = _organizationRepository.GetAll().Where(x => x.IsDeleted == false); if (!string.IsNullOrWhiteSpace(request.Query)) { organization = organization.Where(x => x.Name.Contains(request.Query) || x.Address.Contains(request.Query)); } if (_currentUserService.RoleName == Role.Manager) { organization = organization.Where(x => x.Manager.Id == Guid.Parse(_currentUserService.UserId)); } var organizationList = await _organizationRepository.BrowseAsync(organization, request); return(_mapper.Map <PagedResult <OrganizationDto> >(organizationList)); }
public async Task <PagedResult <Order> > BrowseAsync(BrowseOrders query) => await _repository.BrowseAsync(o => o.CustomerId == query.CustomerId, query);
public async Task <PagedResult <Customer> > BrowseAsync(BrowseCustomers query) => await _repository.BrowseAsync(_ => true, query);
public async Task <IEnumerable <Flight> > BrowseAsync(int pageSize, int page) => await _collection.BrowseAsync(pageSize, page);
public async Task <PagedResult <Product> > BrowseAsync(BrowseProduct query) => await _repository.BrowseAsync(q => q.CategoryId == query.Id, query);
public async Task <PagedResult <ProductCategory> > BrowseAsync(BrowseProductCategory query) => await _repository.BrowseAsync(q => q.Name != "", query);
public async Task <PagedResult <Document> > BrowseAsync(BrowseDocumentsByExternalId query) => await _repository.BrowseAsync(q => query.Ids.Contains(q.ExternalId), query);
public async Task <PagedResult <ContractDto> > Handle(MyContractQuery request, CancellationToken cancellationToken) { var contract = await _contractRepository.BrowseAsync(x => x.User.Id == Guid.Parse(_currentUser.UserId), request); return(_mapper.Map <PagedResult <ContractDto> >(contract)); }
public async Task <PagedResult <DomainEntities.Product> > BrowseAsync(BrowseProducts query) => await _repository.BrowseAsync(p => p.Category == query.Category, query);
public async Task <PagedResult <Product> > BrowseAsync(BrowseProducts query) => await _repository.BrowseAsync(p => p.Price >= query.PriceFrom && p.Price <= query.PriceTo, query);
public async Task <PagedResult <TodoItem> > BrowseTodosForUser(BrowseTodosForUser query) => await _repository.BrowseAsync(items => items.Id == query.Id, query);
public async Task <PagedResult <TEntity> > BrowseAsync <TQuery>(Expression <Func <TEntity, bool> > predicate, TQuery query) where TQuery : IPagedQuery => await _decoratedRepository.BrowseAsync(predicate, query);