title: DBContext Method not found (System.MissingMethodException on OnModelCreating())
body: <p>I've been stuck with below exception from OnModelCreating() in  DBContext and struggling to find the cause or a solution. Can't find much help online either.</p>
  
  <pre><code> {System.MissingMethodException: Method not found: 'System.Nullable`1&lt;Int32&gt; Models.Application.get_AddrSeqNum()'. at Data.Configuration.ApplicationConfiguration..ctor()
  </code></pre>
  
  <p>Any help or ideas please?</p>
  
  <h2>Details:</h2>
  
  <p>I've two entity types 'Application' and 'Organization' and their Entity Type Configurations as below:</p>
  
  <pre><code>public  class Application
  {
     public int ApplId { get; set; }
     public int? OrganizationId { get; set; } // Compsite FK (maps to ExternalId in Organization)
     public int? AddrSeqNum { get; set; } // Compsite FK (maps to AddrSeqNum)
     public virtual Organization Organization { get; set; }     
  }
  
  public class Organization
  {       
      public int Id { get; set; }
      /// &lt;summary&gt;
      /// Organization ID
      /// &lt;/summary&gt;
      public int ExternalId { get; set; }
      public int AddrSeqNum { get; set; }        
  }
  
  public class ApplicationConfiguration : EntityTypeConfiguration&lt;Application&gt;
  {
      ToTable("Application");            
  
      HasKey(e =&gt; e.ApplId)
        .Property(e =&gt; e.ApplId)
        .HasColumnName("appl_id")
        .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
  
       Property(e =&gt; e.AddrSeqNum)
            .HasColumnName("addr_seq_num");
  
       // Relationship
       HasOptional(e =&gt; e.Organization)
              .WithMany()
              .HasForeignKey(e =&gt; new { e.OrganizationId, e.AddrSeqNum });
  }
  
  public class OrganizationConfiguration : EntityTypeConfiguration&lt;Organization&gt;
  {
      public OrganizationConfiguration()
      {
          ToTable("Organization");
  
          HasKey(e =&gt; new { e.ExternalId, e.AddrSeqNum }); // Compsite Unique key in table
  
          Property(e =&gt; e.ExternalId)
              .HasColumnName("external_id");
  
          Property(e =&gt; e.AddrSeqNum)
             .HasColumnName("addr_sequence");
  
          Property(e =&gt; e.Id)
              .HasColumnName("Id") // Primary key (auto increment)
              .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
      }
  }
  </code></pre>
  
  <p>DBContext:</p>
  
  <pre><code>public partial class AppDbContext : DbContext
  {
      public AppDbContext ()
      {
          Configuration.LazyLoadingEnabled = true;
          Configuration.ProxyCreationEnabled = false;
          //Configuration.AutoDetectChangesEnabled = false;
  
          DbInterception.Add(new FtsInterceptor());
          Database.Log = (msg) =&gt; Logger.Debug(msg);
      }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          modelBuilder.Conventions.Remove&lt;PluralizingTableNameConvention&gt;();
  
          modelBuilder.Configurations  // &lt;&lt;- Exception from here
              .Add(new ApplicationConfiguration())                
              .Add(new OrganizationConfiguration())
          base.OnModelCreating(modelBuilder);
      }
  }
  </code></pre>