ZZZ Code AI
Report Issues
Suggest Features
Login
EF Core Tools
Chat
Code Explain
More Tools
How to apply migration at runtime in EF Core?
<p>You can apply any pending migration at runtime with the <code>context.Database.Migrate()</code> method:</p> <pre><code class="language-csharp">using (var context = new MyContext()) { context.Database.Migrate(); } </code></pre>
Sponsored by
Entity Framework Extensions
This field is required
A text with a minimum of 10 characters is required
Send
Legal & Licensing
Answer generated by AI may produce inaccurate information about code, people, facts, and more.
Advertising Break!
5
seconds left
Did you know...
That you can now sponsor this project on
GitHub
?