public async Task <IList <VacancySummary> > GetProviderOwnedVacancySummariesByUkprnAsync(long ukprn) { var match = new BsonDocument { { "$match", new BsonDocument { { "trainingProvider.ukprn", ukprn }, { "ownerType", OwnerType.Provider.ToString() }, { "isDeleted", false } } } }; var aggPipeline = VacancySummaryAggQueryBuilder.GetAggregateQueryPipeline(match); return(await RunAggPipelineQuery(aggPipeline)); }
public async Task <IList <VacancySummary> > GetEmployerOwnedVacancySummariesByEmployerAccountAsync(string employerAccountId) { var match = new BsonDocument { { "$match", new BsonDocument { { "employerAccountId", employerAccountId }, { "ownerType", OwnerType.Employer.ToString() }, { "isDeleted", false } } } }; var aggPipeline = VacancySummaryAggQueryBuilder.GetAggregateQueryPipeline(match); return(await RunAggPipelineQuery(aggPipeline)); }