EF run Seed method without model changes
<p>I have a webAPI hosted in Azure as my back-end. I am using Code-First to create my entities. I can pre-feed my DB fine via the seed method, but if I am done with my model changes and then remember that I need to add something to the seed, there is no way to run the seed method.
Multiple posts suggest the simple run update-database. I do see: &quot;Running Seed method.&quot; and then publish to azure, my table is still empty. And I don't want to change the models just to trigger the seed, because that is just not clean solution.</p>
<p>I have already tried using each of the commented lines but no avail</p>
<pre><code>    public MyContext() : base(&quot;name=MyContext&quot;)
    {
        //Database.SetInitializer(new MigrateDatabaseToLatestVersion&lt;MyContext, MyProject.Migrations.Configuration&gt;(&quot;DefaultConnection&quot;));
        //Database.SetInitializer&lt;MyContext&gt;(new DropCreateDatabaseAlways&lt;MyContext&gt;());
    }
</code></pre>
<p>is there something I should be doing at the azure side or it just plainly doesn't work unless I change one my models!?</p>
<h1>Update1:</h1>
<p>I already the migrations folder and follow the commands to enable it and update the db and when I have a model change, the db updates just fine. That works, no issue there. The only issue if I want to add things to the seed method and I want to execute it without having to change my model.</p>