dotnet / dotnet/EntityFramework.Docs

`dotnet ef database update` does NOT support all the common options despite documentation saying it does

Open
#4,637 0 comments 0 reactions 0 assignees View on GitHub
area-tools
Dominant language
Mermaid
Stars
1.7k
Forks
2k
Avg merge
7d 23h
Merged PRs (30d)
16

Description

If you try and run `dotnet ef database update` with the `--json` common options you get the following error:

```
Specify --help for a list of available options and commands.
Unrecognized option '--json'
```

This is despite the documentation making specific mention that it supports the common options:
https://learn.microsoft.com/en-us/ef/core/cli/dotnet#dotnet-ef-database-update

![image](https://github.com/dotnet/EntityFramework.Docs/assets/1888486/ebd2e3ea-3653-4625-a60c-122c7516149e)

The DX is poor if commands support subsets of the common options.
Personally, it either supports ALL common options or must define its own subset list of options.

I understand the "json" flag may not really mean anything to `databases update` but then simply ignore it.

It makes scripting around the tool more difficult than it needs to be.

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 4d1bdeea-0ebc-04ff-5b58-1020ad9cd72a
* Version Independent ID: 847fe92a-2940-afbf-b2ee-e68f8a8060be
* Content: [EF Core tools reference (.NET CLI) - EF Core](https://learn.microsoft.com/en-us/ef/core/cli/dotnet)
* Content Source: [entity-framework/core/cli/dotnet.md](https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/cli/dotnet.md)
* Product: **entity-framework**
* Technology: **entity-framework-core**
* GitHub Login: @bricelam
* Microsoft Alias: **avickers**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.