-
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 Microsoft.EntityFrameworkCore.Templates #28678
Conversation
Adds a new package that can be installed via `dotnet new`: dotnet new install Microsoft.EntityFrameworkCore.Templates::7.0.0-* For now, it just includes a single item template that will add the default T4 templates used by `dotnet ef dbcontext scaffold`. dotnet new ef-templates You can then tweak the templates and they'll automatically be used when scaffolding. dotnet ef dbcontext scaffold Filename=northwind.db Microsoft.EntityFrameworkCore.Sqlite Resolves dotnet#4038
Looking forward - will this be in rc1? |
</ParameterGroup> | ||
<Task> | ||
<Using Namespace="System.IO" /> | ||
<Code Type="Fragment" Language="cs"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about inlining the task source here, we should discuss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I considered a lot of alternatives. This one seemed the most maintainable.
@ErikEJ Yep! We're branching for it sometime next week. lol, that's why there's been a flurry of PRs from the team... |
Hello @bricelam! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Apologies, while this PR appears ready to be merged, I've been configured to only merge when all checks have explicitly passed. The following integrations have not reported any progress on their checks and are blocking auto-merge:
These integrations are possibly never going to report a check, and unblocking auto-merge likely requires a human being to update my configuration to exempt these integrations from requiring a passing check. Give feedback on thisFrom the bot dev teamWe've tried to tune the bot such that it posts a comment like this only when auto-merge is blocked for exceptional, non-intuitive reasons. When the bot's auto-merge capability is properly configured, auto-merge should operate as you would intuitively expect and you should not see any spurious comments. Please reach out to us at fabricbotservices@microsoft.com to provide feedback if you believe you're seeing this comment appear spuriously. Please note that we usually are unable to update your bot configuration on your team's behalf, but we're happy to help you identify your bot admin. |
@bricelam yes. I have noticed the rush hour. |
Is this feature available to use? I have .NET 7.0.100-preview.7.22377.5 installed along with the 7.0.0-preview.7.22376.2 versions of M.EFC.SqlServer and M.EFC.Tools but when I try to install the templates using the method described above I get the following:
Is there something I'm missing? |
@andre-artus It is in the daily builds, and coming in RC1 around second week of september. Or you can try it today in EF Core Power Tools latest daily. |
Thanks Erik. I can wait for the RC1. This is a great addition for me as I am working on a DB that uses [unnecessary] prefixes and suffixes all over that just end up muddying the generated code.. Is there much of a difference between what is produced by EF scaffolding and EFC PT? |
@andre-artus Highly recommend you use the daily builds. RC1 is already behind by some way, and will be massively behind by the time it releases. |
@andre-artus not much difference as PT uses same scaffolding Framework. But you can Fix bad object names today with EF Core Power Tools- no need to wait for templates. |
Opened PR #28920 to add instructions for installing daily builds of the template pack |
Thanks Erik and Brice. I'll try the dailies. |
Adds a new package that can be installed via
dotnet new
:For now, it just includes a single item template that will add the default T4 templates used by
dotnet ef dbcontext scaffold
.You can then tweak the templates and they'll automatically be used when scaffolding.
Resolves #4038