How to query for entities with no matching siblings, with LINQ?
- by Ryan
I've got the two following entities ...
class Citation
{
public int CitationId { get; set; }
public string Identifier { get; set; }
}
class CitationIdentifier
{
public int CitationIdentifierId { get; set; }
public string Identifier { get; set; }
}
I'm trying to query for all Citation records where the Identifier property does not match any of the CitationIdentifiers record Identifier property. So, if I have a Citation with an Identifier property containing "foo", but there are no CitationIdentifier records with an Identifier property containing "foo", then I'd like to retrieve that Citation.
I'm working with an IDbSet<Citation>.
Any ideas? Thanks.