title: .NET Core: Microsoft's strategy of extension methods
body: <p>I'm currently toying around with EF7, .NET Core, and so on. With .NET Core, it seems Microsoft's strategy is modularity, open communication, and an composition-based strategy.</p>
  <p>The last point bothers me, since this seems to be a step back. An example: I tested out the new EF7 in combination with LocalDB, so I could simply ship the MDF with 3-4 Tables in my WPF-Application.</p>
  <p>To do so, I needed a strategy to update the MDF for each user to assure the Database always has the same structure. I ended up using the appropriate Extension method:</p>
  <pre><code>    internal BoerseDownloaderDbContext Create()
      {
          var result = _unityContainer.Resolve&lt;BoerseDownloaderDbContext&gt;();
          result.ChangeTracker.AutoDetectChangesEnabled = false;
  
          // http://stackoverflow.com/questions/31216983/update-database-after-model-changes-entity-framework-7
          result.Database.Migrate();
  
          return result;
      }
  </code></pre>
  <p>Now what bothers me: not only does such stuff hurt the Law of Demeter, but Extension-Methods are really painful to work with, since IntelliSense doesn't recognize them in the appropriate Namespace. Since I abstracted the DbContext, I didn't have the <code>using Microsoft.EntityFrameworkCore;</code> Namespace in my Class, so there is no way I could ever know this Method exists. As usual, Stack Overflow gave me a hint, but it seems to really hinder the productivity, since I can never be sure if something exists or if I have to implement it myself.</p>
  <p>It seems like this will get worse, so if we look at this video:
  <a href="https://channel9.msdn.com/Series/A-Developers-Guide-to-Windows-10/08" rel="nofollow noreferrer">https://channel9.msdn.com/Series/A-Developers-Guide-to-Windows-10/08</a>
  At around 21:40, it shows clearly this is the strategy Microsoft is going for.</p>
  <p>Is there anything I'm missing or is it just the fact that Extension Methods aren't very well integrated, an issue we will have to live with?</p>