I've recently started using Simple.Data as my ORM. i've approached a problem with filtering by column from joined table.
My query looks like this:
var candidates = db.dbo.Candidates
.FindAllBy(CommonOfferId: commonOfferId, CandidateId: null)
.Select(
db.dbo.Candidates.Id,
db.dbo.Candidates.Email,
db.dbo.CandidateProfiles.CandidateId
).LeftJoin(db.dbo.CandidateProfiles).On(db.dbo.Candidates.Id == db.dbo.CandidateProfiles.CandidateId);
I want to select entities which don't have ids in another table. This code is not working. I'm getting an exception, that Candidates doesn't have column CandidateId.
Is there any way to filter this query by value from joined table?
It is almost correct: