score:0

var candidate = (await _acceptedofferrepository.getall()
                                          .include(c => c.candidate)
                                          .theninclude(c => c.candidate.qualification)
                                          .where(ao => ao.candidate.id == candidateid && ao.employerid.id == employerid)
                                          .firstordefaultasync())?.candidate;

score:1

var candidate = await _candidaterepository.getall()
    .include(c => c.qualification)
    .include(c => c.acceptedoffers) // optional
    .where(c => c.id == candidateid && 
        c.acceptedoffers.any(ao => ao.employerid.id == employerid))
    .firstordefaultasync();

Related Query

More Query from same tag