I would like to make connection between two entitites.
I have Entity_1 and Entity_2 with relationship one - to many (one Entity_1 can have multiple Entity_2).
So I have my entities: Entity
class Entity_1
{
public int Id { get; set; }
public int Entity_2Id{ get; set; }
public virtual Entity_2 Entity_2{ get; set; }
}
class Entity_2
{
public int Id { get; set; }
public int Entity_2Id{ get; set; }
public virtual ICollection<Entity_1> Entity_1s{ get; set; }
}
How Can I make connection that I have foreign key (Entity_1) in Entity 2 ?