Entity Framework Core - Scaffold existing database to one or group of class files

.net-core ef-code-first entity-framework-core

Question

As stated in this tutorial, I can scaffold code-first EF Core from an existing database using Scaffold-DbContext in the Package Manager Console.

It's all good but my problem is that it scaffolds separate class files for each table and another for the context class. I find this a bit messy if I have too many tables.

I can rearrange it all by hand but Is there a way to scaffold everything to one class file? Or maybe having the context class on a separate file and then group the tables to another file per schema.

1
0
7/9/2016 11:25:33 AM

Popular Answer

This behavior is not an option of EF Core scaffolding as of 1.0.0.

0
7/14/2016 4:05:22 PM


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