title: Entity Framework data migration with custom logic?
body: <p>Suppose, I want to replace table <code>A</code> with table <code>B</code> and migrate all data from one to another, so I do:</p>
  
  <ol>
  <li>Create table <code>B</code> through <strong>SQL query</strong> </li>
  <li>Perform transformation over entire copy of data from <code>A</code> format to <code>B</code> format through <strong>SQL query</strong> </li>
  <li>Put everything to <code>B</code> table through <strong>SQL query</strong> </li>
  <li>Delete table <code>A</code> through <strong>SQL query</strong> </li>
  </ol>
  
  <p>The problem is, sometimes you need to break transaction and do non-transactional transform from <code>A</code> format to <code>B</code> format, which can even involve calls to different services (for example, new geo-political status of object from <code>A</code>, or different serialization contract of fields from <code>A</code>, 7zip it from <code>A</code> to <code>B</code> or whatever you desire to change about data in <code>A</code>).</p>
  
  <p>So, the question is, how to accomplish <strong>step 2</strong> through EF in <strong>any desirable way</strong>:</p>
  
  <ol start="2">
  <li>Perform transformation over entire copy of data from <code>A</code> format to <code>B</code> format through <strong>"black box"</strong> </li>
  </ol>
  
  <p>By that I mean not breaking concept of EF migration files, and providing me with something like "Main" method as entry point for my migration step. Any suggestions?</p>