title: EF-Core - Database first migration
body: <p>I'm wondering if there's a standard way of handling migrations when using EF Core database-first.</p>
  
  <p>Every time I make change to the database I run this in the CLI:<br></p>
  
  <pre><code>dotnet ef dbcontext scaffold "Data Source=(local);Initial Catalog=myCatalog;Trusted_Connection=true;" Microsoft.EntityFrameworkCore.SqlServer -o Models -f
  </code></pre>
  
  <p>The problem with it overrides every change I made in other entity and in the dbcontext, for example I have an interface of <code>Id</code> for each entity, when I scaffold I later need to add this to the entity again, is it possible sync the project with the database or maybe just the specific entity?</p>
  
  <p>Another problem is that I recently had to change the default<code>DeleteBehavior</code> of the entities from <code>DeleteBehavior.ClientSetNull</code> to <code>DeleteBehavior.Cascade</code> so now every time I use the scaffolding approach I need to change manually 100+ entities in the <code>OnModelCreating</code> method.</p>