title: How to set foreign key in EntityTypeConfiguration Class
body: <p>I just started to make EntityTypeConfiguration class and did following </p>
  
  <pre><code>public class Xyz
  {
     public int PlaceId { get; set; }
  
      public string  Name { get; set; }
  
      public DbGeography Location { get; set; }
  
      public int HumanTypeId { get; set; }
  
      public int AddressId { get; set; }
  }
  </code></pre>
  
  <p>and in EntityTypeConfiguration  class </p>
  
  <pre><code> public sealed class XyzConfiguration:EntityTypeConfiguration&lt;Xyz&gt;
  {
      public XyzConfiguration()
      {
          ToTable("Place", "dbo");
          HasKey(p =&gt; p.PlaceId);   
          Property(p =&gt; p.PlaceId)
              .HasColumnName("PlaceId")
              .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
  
          Property(p =&gt; p.Name);
          Property(p =&gt; p.Location). ;
          Property(p =&gt; p.HumanTypeId);
          Property(p =&gt; p.AddressId);
      }
  }
  </code></pre>
  
  <p>Now how to set <code>DbGeography</code> and foreign key columns <code>HumanTypeId , AddressId</code> ? </p>
  
  <p>Thanks in advance </p>