Comment définir la clé étrangère dans EntityTypeConfiguration Classe

J'ai juste commencé à faire EntityTypeConfiguration classe et a fait à la suite

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; }
}

et dans EntityTypeConfiguration classe

 public sealed class XyzConfiguration:EntityTypeConfiguration<Xyz>
{
    public XyzConfiguration()
    {
        ToTable("Place", "dbo");
        HasKey(p => p.PlaceId);   
        Property(p => p.PlaceId)
            .HasColumnName("PlaceId")
            .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

        Property(p => p.Name);
        Property(p => p.Location). ;
        Property(p => p.HumanTypeId);
        Property(p => p.AddressId);
    }
}

Maintenant comment définir DbGeography et les colonnes de clé étrangère HumanTypeId , AddressId ?

Merci d'avance

OriginalL'auteur Ancient | 2013-09-15