title: EF Unique property in entity - one context, multiple databases code first
body: <p>I have a specific scenario:</p>
  
  <ul>
  <li>one DbContext MyContext</li>
  <li>twoDatabases Db1 and Db2</li>
  <li>Entity MyEntity with properties a, b, and c</li>
  </ul>
  
  <p>Context:</p>
  
  <pre><code>public class MyContext : DbContext
  {
      public MyContext(string connString) : base(connString)
      {
  
      }
  
      public virtual DbSet&lt;MyEntity&gt; MyDbSet { get; set; }
  </code></pre>
  
  <p>I apply migration in db1, it creates table MyEntity, with columns a,b,c.</p>
  
  <p>Now with the same context i want to have MyEntity in db2 but only with columns a,b. What I do is:</p>
  
  <pre><code>protected override void OnModelCreating(DbModelBuilder modelBuilder)
  {
      if(IsDb2)
      {
          modelBuilder.Entity&lt;MyEntity&gt;().Ignore(x =&gt; x.PropertyC);
      }
  }
  </code></pre>
  
  <p>But it results in error when adding a migration: The property PropertyC is not a declared property on type MyEntity.</p>
  
  <p>Is what I'm trying to achieve even possible with EF? I'm using EF 6.</p>
  
  <p>Many thanks in advance for clarifying this!</p>