Skip to content
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

Add DbContext Validate to CLI/PS commands #9052

Closed
julielerman opened this issue Jul 3, 2017 · 3 comments
Closed

Add DbContext Validate to CLI/PS commands #9052

julielerman opened this issue Jul 3, 2017 · 3 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. good first issue This issue should be relatively straightforward to fix. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. type-enhancement
Milestone

Comments

@julielerman
Copy link

The validation that EF does when you run a migrations command provides very helpful error messages.

Is it possible to have a command just for that task so you don't have to add a migration just to check to see if the model is valid?

CLI
dotnet ef dbcontext validate

Powershell
validate-dbcontext (follows pattern of scaffold-dbcontext)

@bricelam
Copy link
Contributor

bricelam commented Jul 3, 2017

Hmm, we have dotnet ef dbcontext info, but no PMC equivalent.

@bricelam
Copy link
Contributor

bricelam commented Jul 3, 2017

Then again, it never builds the model. ...but we could change that.

@ajcvickers ajcvickers added this to the Backlog milestone Jul 5, 2017
@ajcvickers ajcvickers added help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. type-enhancement labels Jul 5, 2017
@bricelam
Copy link
Contributor

bricelam commented Jul 7, 2017

#9096 Adds Get-DbContext in addition to dotnet ef dbcontext info. These commands will run model validation and print out information about the context (provider name, database server, DbContextOptions, etc.)

There is a small bug in the way we log (#8350), but if you're using an ASP.NET Core project, everything will work as expected.

@bricelam bricelam modified the milestones: 2.0.0, Backlog Jul 7, 2017
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jul 7, 2017
@bricelam bricelam self-assigned this Jul 7, 2017
@bricelam bricelam added good first issue This issue should be relatively straightforward to fix. and removed good first issue This issue should be relatively straightforward to fix. labels May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. good first issue This issue should be relatively straightforward to fix. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants