dotnet / dotnet/EntityFramework.Docs

Document using argument files for `dotnet ef dbcontext scaffold` Command

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

Description

The problem I am trying to solve is the repetitive and cumbersome process of providing command-line options every time I need to refresh my entities using the `dotnet ef dbcontext scaffold` command. Currently, developers are required to pass various options, such as connection strings, provider names, table names, and more, as command-line arguments each time they scaffold or update their entities.

This approach becomes inconvenient, especially when working on large projects with frequent updates to the database schema or when multiple developers are involved. It can lead to errors, inconsistency in options, and a lack of centralized configuration management.

To address this problem, I propose introducing support for a configuration file, such as a JSON or YAML file, where developers can store commonly used options and settings for the `dotnet ef dbcontext scaffold` command. By utilizing a configuration file, developers can define the required options and customize the scaffolding process in a centralized manner, reducing the need to repeatedly provide command-line arguments.

This enhancement would simplify the process of refreshing entities by allowing developers to reference a configuration file that contains the desired options, eliminating the manual input of command-line arguments and providing a more streamlined and efficient experience.

The configuration file should be similar to [EF Core Power Tools](https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools) configuration.

This may be a separate feature request as I do not believe the tool support this but in the configuration we should also allow certain columns to be excluded and thus not imported into our entities.

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.