-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scaffold a subset of tables - silently ignores / skips tables that cannot be found #4168
Comments
Have you tried "-t" ie no double hyphens? |
Oh yikes - tried using I think if it doesn't like a table it should probably output a warning of some kind to say that it skipped scaffolding for a table because it couldn't find it! :) Thanks for prompting me to relook at this and figure it out! |
I think it should not be case sensitive at all! |
Agreed, as I don't think any of the major relational databases let table names only differ by case.
Also agreed, since you explicitly asked for that table to be included |
@lajones we should warn if the table is not found. Case sensitivity should be up to the provider (and ours should not be case sensitive). |
Note: each provider interprets the |
Fix checked in with PR#4252. Commit 50c51e7. |
If anyone got the below error, Scaffold-DbContext : Cannot bind parameter because parameter 'Tables' is specified more than once. To provide multiple values to parameters that can accept multiple values, use Then try the following format, dnx ef dbcontext scaffold "connstring" EntityFramework.MicrosoftSqlServer --outputDir Models -t dbo.table1, dbo.table2 then try the following command |
I have an existing database that I'd like to scaffold a
DbContext
from, but only for a subset of the tables in this database.I tried:
dnx ef dbcontext scaffold "connstring" EntityFramework.MicrosoftSqlServer --outputDir Models --table dbo.table1 --table dbo.table2
UPDATE:
This doesn't work - it seemed to only scaffold the second table.This does work, but the table names are case sensitive, and if you get the casing wrong, then it seems to silently skip the scaffolding of that table.
I think it should output a warning to say that a table was skipped for some reason.
The text was updated successfully, but these errors were encountered: