How to: Entity Framework Code First - two Foreign Keys from same table
How to: Entity Framework Code First – two Foreign Keys from same table
Entity Framework Code First – two Foreign Keys from same table
I’ve just started using EF code first, so I’m total beginner in this topic.
I wanted to create relations between Teams and Matches: 1 match = 2 teams (home, guest) and result. I thought It’s easy to create such model, so I started coding:
public class Team { [Key] public int TeamId { get; set;} public string Name { get; set; } public…
View On WordPress














