-
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
Add a PMC command that will list all DbContext types #15104
Comments
Moved to product repo since this seems to be a bug. |
Get-DbContext is the equivalent of dotnet ef dbcontext info, not dbcontext list. |
Huh, the docs are wrong... |
Submitted docs PR: dotnet/EntityFramework.Docs#1387 @Ponant What was your reason for wanting to list the DbContexts from the package manager console? (Asking to determine whether or not it's worth leaving this open to track doing it.) |
Hi @ajcvickers , I was using it as I use VS so that saves me having a console window opened. |
@Ponant Yes, but why did you want to list the contexts in the first place? |
Note, tab-expansion works for the |
@ajcvickers because I wanted to list the contexts instead of looking up the file names. Yes tab-expansion works too but there is a time lag and it does not list all dbcontexts and it does not always auto-complete... |
@Ponant Thanks! Putting this on the backlog. |
@bricelam Considering this - what would the command name be? Get-DbContexts ?? |
In hindsight, Get-DbContext should have been named Get-DbContextInfo, and this one should be named Get-DbContext... List-DbContext seems OK for now. As usual, we'll discuss the actual name ad nauseam in a design meeting. |
I will give it a shot |
How about a breaking change?
|
👍 Definitely worth discussing |
I will await the discussion outcome |
You don't have to; we can merge it however you send the PR. After discussing, we're happy to do the rename/combine/split ourselves. |
OK, I will investigate how I can get it tested (manually) |
@bricelam Any hints on how to get this tested? |
Managed to get it tested - does this make sense or should the output be modified?
|
I think we can use a formatting file to make it display prettier... But I've never done it. |
By default, I think we should just display |
Merged, but we may want to discuss in a design meeting. |
I have 2 dbcontext and Get-DbContext complains that I need to provide one whereas the docs says that it will list the Lists available DbContext types.
it is a bit astonishing that this error occurs whereas one could use the CLI tooling which works with
dotnet ef dbcontext list
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: