I have the following Entity which used to be a query type:
``` C#
modelBuilder
.Entity
.HasNoKey();
As a query type it caused no issues, but now that it's an entity, migrations are trying to create tables for it.
I have several entities defined like so, none of which attempt table generation when adding a migration. I assume it's because of the ToView():
``` C#
modelBuilder
.Entity<AreaUserInfo>()
.HasNoKey()
.ToView("v_AreaUserInfos");
The problem is that my above entity types come out of a stored procedure. It's not a View or a Table.
I don't want to have to manually modify every migration going forward to account for this. Is there a way to prevent table generation when creating migrations?
EF Core version: 3.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET Core 3.0
Operating system: Windows 10
IDE: Visual Studio 2019 16.3
Related to #17270 and #2725.
For now, you can just use something like .ToView("You forgot to use FromSql with ModQueueEntry")
Note from triage: closing this as duplicate since the work here is covered by #17270 and #2725.
Most helpful comment
Related to #17270 and #2725.
For now, you can just use something like
.ToView("You forgot to use FromSql with ModQueueEntry")