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

Scaffolding option to specify a class suffix #27887

Closed
vanillajonathan opened this issue Apr 25, 2022 · 3 comments
Closed

Scaffolding option to specify a class suffix #27887

vanillajonathan opened this issue Apr 25, 2022 · 3 comments

Comments

@vanillajonathan
Copy link
Contributor

To avoid having my scaffolded class names have the same names as classes I already have I would like an option for the dotnet ef tool to specify a suffix for the class name.

Example:

dotnet ef dbcontext scaffold "DataSource=..." Microsoft.EntityFrameworkCore.Sqlite --class-suffix=ReadModel

which would generate:

public class BloggingContext : DbContext
{
    public DbSet<BlogReadModel> Blogs { get; set; }
    public DbSet<PostReadModel> Posts { get; set; }
@ErikEJ
Copy link
Contributor

ErikEJ commented Apr 26, 2022

Fwiw, there is a renaming feature in EF Core Power Tools .

@roji
Copy link
Member

roji commented Apr 26, 2022

7.0 is introducing scaffolding templates; this would allow you to tweak the templates for the above and any other similar customizations.

@roji
Copy link
Member

roji commented Apr 26, 2022

Duplicate of #4038

@roji roji marked this as a duplicate of #4038 Apr 26, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants