Skip to content
New issue

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

HasNoKey() cause migration to generate table #19621

Closed
domdeger opened this issue Jan 17, 2020 · 1 comment
Closed

HasNoKey() cause migration to generate table #19621

domdeger opened this issue Jan 17, 2020 · 1 comment

Comments

@domdeger
Copy link

We use e.g. modelBuilder.Entity<QueryResult>().HasNoKey(); to register custom query result types for usage with "FromRawSql". We migrated from DbQuery<> as we moved along from ef core 2.2 .

Since ef core 3.1 new migrations include code to create table for the entity types marked with .HasNoKey(). The only way I was able to work around this behaviour was to call "ToView" on those types.

Steps to reproduce

@ajcvickers
Copy link
Member

@domdeger Yes, this is correct. Improving the experience here is tracked by #17270

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants