title: The model backing the 'MyContext' context has changed since the database was created
body: <p>I am Getting the following error when I run my Unit Test  (The model backing the 'MyContext' context has changed since the database was created)</p>
  
  <p>Inside my context constructor I have set the </p>
  
  <pre><code>Database.SetInitializer&lt;MyContext&gt;(null);
  </code></pre>
  
  <p>In my Unit test I am mocking the context. I have also added this code to the unit test and it still fails. Is there anything else that needs to be done apart from the <code>Database.SetInitializer&lt;MyContext&gt;(null);</code></p>
  
  <p>My Context is here </p>
  
  <pre><code> public class MyContext : DbContext
    {
      public MyContext () : base("MyContext") 
      {
        Database.SetInitializer&lt;MyContext&gt;(null);
      }
  
      public virtual DbSet&lt;User&gt; Users { get; set; }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
        modelBuilder.Entity&lt;User&gt;().ToTable("Users");
      }
    }
  </code></pre>
  
  <p>My Mock in the unit test </p>
  
  <pre><code>  var _context = new Mock&lt;MyContext&gt;();
    Database.SetInitializer&lt;MyContext&gt;(null);
    _classUnderTest = new Repo(_context.Object);
  </code></pre>
  
  <p>I get the error here</p>
  
  <pre><code>  _context.Entry(user).State = EntityState.Added; 
  </code></pre>