简体   繁体   English

使用数据库第一种方法排除表

[英]Excluding tables with database first approach

Is there a way to exclude tables when running the Scaffold-DbContext command? 有没有办法在运行Scaffold-DbContext命令时排除表?

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 但我得到Build failed

The Tables parameter accepts single dimensional string array, you just need to change it to array format: Tables参数接受单维字符串数组,您只需将其更改为数组格式:

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

Thanks Bread! 谢谢面包!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用数据库优先方法读取 asp.net 内核中的表 - How to read tables in asp.net core, with database first approach 如何在已有多个表的现有数据库中对单个表使用Code First方法 - How to use Code First approach for single table in existing database which already has many tables 如何从没有.tt和edmx文件的数据库优先方法获取表? - How to get tables from database first approach without .tt and edmx files? 如何使用数据库迁移和EF 4.3与代码第一种方法来创建关系表? - How to use Database Migrations and EF 4.3 with a code first approach to create relationship tables? 是否可以使用实体框架数据库优先方法从数据库表创建的模型之外创建视图模型? - Is it possible to create view models by out of models created from database tables using entity framework DB first approach? 如何混合数据库优先和代码优先的方法 - How to mix Database first and Code first approach 呈现存储在数据库代码优先方法中的Pdf - Rendering a Pdf that is stored in the Database Code First Approach 数据库未使用代码优先方法在 blazor 中创建 - database not create in blazor using code first approach 带有实体框架 6 的 Postgresql(数据库优先方法) - Postgresql with Entity Framework 6 (database first approach) 如何使用数据库第一种方法命名外键 - How to name foreign keys with database first approach
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM