Entity Framework Core Stored Proc without DbSet
问题 I am calling a stored proc from EF Core 1.1, following the advice on https://docs.microsoft.com/en-us/ef/core/querying/raw-sql But I created a class specifically that matches the shape of data returned from the stored proc List<MyStoredProcResultType> results = context.MyStoredProcResultType .FromSql("EXECUTE dbo.MyStoredProc {0}", someParam) .ToList(); But this means I have to create a DbSet for MyStoredProcResultType in the Context and now it is legal to code this context