Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding tables with database first approach

Is there a way to exclude tables when running the Scaffold-DbContext command?

I tried something like

Scaffold-DbContext -provider EntityFramework.MicrosoftSqlServer 
       -connection "xxx" -OutputDirectory Models 
       -Tables "dbo.a,dbo.b,dbo.c,dbo.d"

but I get Build failed

like image 974
Bread Avatar asked Mar 29 '16 01:03

Bread


1 Answers

The Tables parameter accepts single dimensional string array, you just need to change it to array format:

"dbo.a", "dbo.b", "dbo.c"

Thanks Bread!

like image 200
Dr. Stitch Avatar answered Oct 08 '22 13:10

Dr. Stitch