How to scaffold views and stored procedures from SQL Server to ASP.NET Core 2.2 project?

asp.net-core-2.2 asp.net-core-scaffolding entity-framework-core

Question

I have an existing database in SQL Server that I need to connect to ASP.NET Core 2.2 project with EF Core. I scaffolded the models and the DbContext via the Scaffold-DbContext command in Package Manager Console. I can access all the data from the tables. However this didn't scaffold the procedures or the views.

This is a major obstacle to starting to use ASP.NET Core in our apps. Is there any way we could circumvent this? Can it be done in ASP.NET Core 2.2 or in a later version?

1
0
6/24/2019 10:16:01 AM

Accepted Answer

Stored procedure and view mapping is not currently supported in ef core scaffolding. You can track open issues respectively at 245 and 827.

1
6/24/2019 10:32:02 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow