Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

'KeyBuilder' does not contain definition for 'Ignore' in EF Core #115

Closed
RuiAlias opened this issue Oct 28, 2019 · 0 comments
Closed

'KeyBuilder' does not contain definition for 'Ignore' in EF Core #115

RuiAlias opened this issue Oct 28, 2019 · 0 comments
Labels
bug Confirmed bug released Issue is resolved in a current release
Milestone

Comments

@RuiAlias
Copy link
Contributor

Hi, I'm getting the following error with v1.3.0.8pre-2:
'KeyBuilder' does not contain definition for 'Ignore'

I believe the relevant code is

// primary key code segments must be output last, since HasKey returns a different type
List<ModelAttribute> identityAttributes = modelClass.IdentityAttributes.ToList();
if (identityAttributes.Count() == 1)
segments.Add($"HasKey(t => t.{identityAttributes[0].Name})");
else if (identityAttributes.Count() > 1)
segments.Add($"HasKey(t => new {{ t.{string.Join(", t.", identityAttributes.Select(ia => ia.Name))} }})");
}
}
foreach (ModelAttribute transient in modelClass.Attributes.Where(x => !x.Persistent))
segments.Add($"Ignore(t => t.{transient.Name})");

@msawczyn msawczyn added the pending release Issue is resolved in the current codebase, will be published with the next release label Oct 28, 2019
@msawczyn msawczyn added this to the 1.3.0.8 milestone Oct 28, 2019
@msawczyn msawczyn added bug Confirmed bug released Issue is resolved in a current release and removed pending release Issue is resolved in the current codebase, will be published with the next release labels Nov 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug released Issue is resolved in a current release
Projects
None yet
Development

No branches or pull requests

2 participants