Exemple #1
0
 public CanAccessCohortQueryHandlerTestsFixture SetNonMatchingQuery()
 {
     Query = new CanAccessCohortQuery {
         CohortId = _cohortId + 1, Party = Party.Provider, PartyId = _accountId
     };
     return(this);
 }
Exemple #2
0
 public CanAccessCohortQueryHandlerTestsFixture SetMatchingAccountQuery()
 {
     Query = new CanAccessCohortQuery {
         CohortId = _cohortId, Party = Party.Employer, PartyId = _accountId
     };
     return(this);
 }
Exemple #3
0
 public CanAccessCohortQueryHandlerTestsFixture SetMatchingProviderQuery()
 {
     Query = new CanAccessCohortQuery {
         CohortId = _cohortId, Party = Party.Provider, PartyId = _providerId
     };
     return(this);
 }
        public async Task <IActionResult> CanAccessCohort(CohortAccessRequest request)
        {
            var query = new CanAccessCohortQuery
            {
                CohortId = request.CohortId,
                Party    = request.Party,
                PartyId  = request.PartyId
            };

            return(Ok(await _mediator.Send(query)));
        }