title: Value cannot be null. Parameter name: extent
body: <p>I'm using EF6 code first to create my db. Everything was working well last night, now when i run update-database command, I get the following exception:</p>
  
  <pre><code>PM&gt; update-database
  Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
  System.ArgumentNullException: Value cannot be null.
  Parameter name: extent
     at System.Data.Entity.Utilities.Check.NotNull[T](T value, String parameterName)
     at System.Data.Entity.Core.Mapping.StorageEntitySetMapping..ctor(EntitySet extent, StorageEntityContainerMapping entityContainerMapping)
     at System.Data.Entity.ModelConfiguration.Edm.DbDatabaseMappingExtensions.AddEntitySetMapping(DbDatabaseMapping databaseMapping, EntitySet entitySet)
     at System.Data.Entity.ModelConfiguration.Edm.Services.TableMappingGenerator.Generate(EntityType entityType, DbDatabaseMapping databaseMapping)
     at System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.GenerateEntityTypes(DbDatabaseMapping databaseMapping)
     at System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.Generate(EdmModel conceptualModel)
     at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)
     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.LazyInternalContext.get_CodeFirstModel()
     at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer)
     at System.Data.Entity.Utilities.DbContextExtensions.&lt;&gt;c__DisplayClass1.&lt;GetModel&gt;b__0(XmlWriter w)
     at System.Data.Entity.Utilities.DbContextExtensions.GetModel(Action`1 writeXml)
     at System.Data.Entity.Utilities.DbContextExtensions.GetModel(DbContext context)
     at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext)
     at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration)
     at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.GetMigrator()
     at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run()
     at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
     at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
     at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
     at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
     at System.Data.Entity.Migrations.UpdateDatabaseCommand.&lt;&gt;c__DisplayClass2.&lt;.ctor&gt;b__0()
     at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
  Value cannot be null.
  Parameter name: extent
  </code></pre>
  
  <p>Here is the Context Class</p>
  
  <pre><code>public class WheelTrackDb : DbContext
  {
      public WheelTrackDb(): base("DefaultConnection"){ }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          modelBuilder.Entity&lt;Driver&gt;()
              .HasRequired(d =&gt; d.Vehicle)
              .WithOptional(v =&gt; v.Driver)
              .Map(m =&gt; m.MapKey("VehicleId"));
  
          modelBuilder.Entity&lt;TransactionLog&gt;()
             .HasRequired(t =&gt; t.Acceptor)
             .WithMany()
             .HasForeignKey(t =&gt; t.AcceptorId)
             .WillCascadeOnDelete(false);
  
          modelBuilder.Entity&lt;TransactionLog&gt;()
             .HasRequired(t =&gt; t.Donor)
             .WithMany()
             .HasForeignKey(t =&gt; t.DonorId)
             .WillCascadeOnDelete(false);
  
          modelBuilder.Entity&lt;Violation&gt;()
              .HasRequired(v =&gt; v.GSMDeviceLog)
              .WithMany(g =&gt; g.Violations)
              .HasForeignKey(v =&gt; v.GSMDeviceLogId);
  
          modelBuilder.Entity&lt;RouteFence&gt;().Ignore(r =&gt; r.PolygonVertices);
  
          modelBuilder.Entity&lt;Vehicle&gt;()
              .HasRequired(v =&gt; v.License)
              .WithRequiredPrincipal();
  
          modelBuilder.Entity&lt;MessageCounter&gt;()
              .HasRequired(m =&gt; m.License)
              .WithOptional(l =&gt; l.MessageCounter)
              .Map(m =&gt; m.MapKey("LicenseId"));
  
          modelBuilder.Entity&lt;GSMDeviceLog&gt;()
              .HasRequired(g =&gt; g.Vehicle)
              .WithMany(t =&gt; t.GsmDeviceLogs);
  
      }
  
      public DbSet&lt;UserInfo&gt; UserInfos{ get; set; }
      public DbSet&lt;TransactionLog&gt; TransactionLogs{ get; set; }
      public DbSet&lt;Driver&gt; Drivers { get; set; }
      public DbSet&lt;Vehicle&gt; Vehicles{ get; set; }
      public DbSet&lt;VehicleGroup&gt; VehicleGroups { get; set; }
      public DbSet&lt;License&gt; Licenses { get; set; }
      public DbSet&lt;Policy&gt; Policys { get; set; }
      public DbSet&lt;GSMDeviceLog&gt; GSMDeviceLogs { get; set; }
      public DbSet&lt;MessageCounter&gt; MessageCounters { get; set; }
      public DbSet&lt;Violation&gt; Violations { get; set; }
      public DbSet&lt;OwnershipPaper&gt; OwnershipPapers { get; set; }
      public DbSet&lt;Subscriber&gt; Subscribers { get; set; }
  }
  </code></pre>
  
  <p>And here is the Configuration:</p>
  
  <pre><code>internal sealed class Configuration : DbMigrationsConfiguration&lt;WheelTrack.Models.WheelTrackDb&gt;
  {
      public Configuration()
      {
          AutomaticMigrationsEnabled = true;
      }
  
  
      protected override void Seed(WheelTrack.Models.WheelTrackDb context)
      {
  
      }
  }
  </code></pre>
  
  <p>I've searched internet and found that I should only have properties in my context class. And I checked thrice, it only has dbset properties. I'm unable to figure out what has happened. Any help would be greatly appreciated. Thanks.</p>