title: EF Core 2.1. Use custom database schema for migration
body: <p>Today I moved a project from EF 2.0 to EF 2.1. </p>
  
  <p>I want to change default database schema from <code>dbo</code> to <code>MySchema</code></p>
  
  <p>With EF Core 2.0 I used the following code:</p>
  
  <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder)
  {
      modelBuilder.HasDefaultSchema("MySchema");
  }
  </code></pre>
  
  <p>But I don't see <code>.HasDefaultSchema</code> method any more in EF Core 2.1.  </p>
  
  <p>How can you change default schema in EF Core 2.1?!</p>
  
  <p><strong>Note.</strong> As the quick solution used Table annotation with each entity model  </p>
  
  <pre><code>[Table("MyEntities", Schema = "MySchema")]
  public class MyEntity
  {
      public int Id { get; set; }
  }
  </code></pre>