title: EF force reload of DB in Azure
body: <p>I am using EF Code First. I am trying to seed my DB and refresh it in Azure every time I publish it. everyone suggests using this command, but it is not working. I've tried adding it to the <code>global.asax</code> and in the constructor of the context that inherits from <code>DBContext</code>, but no success:</p>
  
  <pre><code>Database.SetInitializer&lt;MyAPIContext&gt;(new DropCreateDatabaseAlways&lt;MyAPIContext&gt;())
  </code></pre>
  
  <p>I do my seeding using:</p>
  
  <pre><code>context.Users.AddOrUpdate(p =&gt; p.UserName,
          new User
          {
              UserName = "John",
              Age = 21
          },
          new User 
          {
              UserName = "Mark",
              Age = 23
          },
  </code></pre>
  
  <p>and when I am ready to publish to my azure, I first update db:</p>
  
  <pre><code>update-database
  </code></pre>
  
  <p>and then I publish. for a test, I published it once with both users (John and Mark) and then the second time I remove the second user (Mark) before I redo update-database and publish, but it keeps remembering it after the 2nd publish</p>
  
  <p>What's the deal? I want it to completely forget about previous records and just give me what I requested the last time</p>