We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have the IdentificationType class:
IdentificationType
public sealed record IdentificationType { public int Id { get; } public string Alias { get; } private IdentificationType(int id, string alias) { this.Id = id; this.Alias = alias; } public bool Equals(IdentificationType? left) => this.Alias == left?.Alias; public override int GetHashCode() => this.Alias.GetHashCode(); }
The property Alias is configured as Alternate key, and the Id as Primary key. I want to use the Equals method in Ef core, in this way:
Alias
Id
Equals
public Task<IdentificationType?> Find(IdentificationType identificationType) { return dbContext.IdentificationType .AsExpandableEFCore() .SingleOrDefaultAsync(i => i.Equals(identificationType)); }
When the Find method is invoked, Ef core uses Id instead of Alias. How I could configure LinqKit to expand the Equals method?
Find
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have the
IdentificationType
class:The property
Alias
is configured as Alternate key, and theId
as Primary key.I want to use the
Equals
method in Ef core, in this way:When the
Find
method is invoked, Ef core usesId
instead ofAlias
.How I could configure LinqKit to expand the
Equals
method?The text was updated successfully, but these errors were encountered: