title: How to have a primary key with a different name than "Id"
body: <p>I have the following situation in my ASP.NET Core application with Entity Framework Core 1.1</p>
  
  <p><strong>Database-Table named "Content"</strong></p>
  
  <ul>
  <li>Content_ID (int not null, primary key)</li>
  <li>Title (varchar max)</li>
  <li>Description (varchar max)</li>
  </ul>
  
  <p><strong>Model ("ContentEntry.cs"):</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>public class ContentEntry
  {
      public int Id {get; set;}
      public string Title {get; set;}
      public string Description {get; set;}
  }
  </code></pre>
  
  <p><strong>Configuration File (ContentEntryConfiguration.cs)</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>public class ContentEntryConfiguration : IEntityMappingConfiguration&lt;ContentEntry&gt;
  {
      public void Map(EntityTypeBuilder&lt;ContentEntry&gt; modelBuilder)
      {
          modelBuilder.HasKey(m =&gt; m.Id);
  
          modelBuilder.Property(m =&gt; m.Id).HasColumnName("Content_ID");
          modelBuilder.Property(m =&gt; m.Title ).HasColumnName("Title");
          modelBuilder.Property(m =&gt; m.Description).HasColumnName("Description");
  
          modelBuilder.ToTable("Content");
      }
  }
  </code></pre>
  
  <p>As mentioned above, the primary key of my table is named "Content_ID".
  When I execute a LINQ query, I receive an error saying that <strong>the column "ID" hasn't been found on the database</strong>. After inspecting the generated query with the SQL Profiler, I noticed that the query contains "ID" instead of "Content_ID". 
  I expect entity framework to generate a query containing the column "Column_ID" instead and map it to my model-property named "Id".</p>
  
  <p>Do you have an idea why this is happening and how I could fix this issue?</p>