title: Obfuscation removes datacontext class
body: <p>I'm trying to obfuscate my Winforms app using EAZfuscator. When I try and run the obfuscated app, I get an Entity Framework exception (ProviderIncompatibleException).</p>
  
  <p>Using IlSpy to look at the obfuscated assembly - I notice that whilst most of my namespaces and classes remain as they were (it just seems to be some variable names that have been renamed), it has completely removed my DataContext class (ie. the one that derives from DbContext).</p>
  
  <p>I presume my ProviderIncompatibleException exception is due to the name of connection string needing to match the datacontext class name. I have this in my app.config:</p>
  
  <pre><code>&lt;add name="DsDataContext" connectionString="Data Source=Database.sdf" providerName="System.Data.SqlServerCe.4.0" /&gt;
  </code></pre>
  
  <p>Where DsDataContext is the name of my class that derives from DbContext (the one that appears to have been removed by Eazfuscator).</p>
  
  <p>Has anyone experienced this before? Any reason why this class has been removed by Eazfuscator? Also, I'm curious to why my class names have remained intact. The obfuscation doesn't seem to be very obfuscated.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Below is the exception for completeness. I presume I'm getting it due to the missing class I mention above though:</p>
  
  <p>Type: System.Data.ProviderIncompatibleException</p>
  
  <p>Message: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.</p>
  
  <p>Source = EntityFramework</p>
  
  <p>StackTrace:</p>
  
  <pre><code>  at System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)
    at System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest&amp; providerManifest)
    at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
    at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
    at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
    at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
    at System.Data.Entity.Internal.InternalContext.CreateObjectContextForDdlOps()
    at System.Data.Entity.Database.Exists()
    at   .()
    at   .()
  </code></pre>