title: Entity Framework creates underscore column when generating database
body: <p>I have a simple object model as follows...</p>
  
  <pre><code>public class Product
  {
      public long ProductId { get; set; }
      public int CategoryId { get; set; }
      public Category Category { get; set; }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>public class Category
  {
      public long CategoryId { get; set; }
      public List&lt;Product&gt; Products { get; set; }
  }
  </code></pre>
  
  <p>Generating the underlying database with EntityFramework results in the following schema...</p>
  
  <p><strong>Products</strong></p>
  
  <ul>
  <li>ProductId</li>
  <li>CategoryId</li>
  <li>Category_CategoryId</li>
  </ul>
  
  <p><strong>Categories</strong></p>
  
  <ul>
  <li>CategoryId</li>
  </ul>
  
  <p>In the <strong>Products</strong> table, the <strong>CategoryId</strong> column is always set to 0 while the <strong>Category_CategoryId</strong> column contains the id of the category the product belongs to.</p>
  
  <p>How do I cause the category id to be set in the <strong>CategoryId</strong> column and prevent the <strong>Category_CategoryId</strong> column from being generated?</p>