0
我想在代码第一个EF中对此进行建模。一个国家的比赛可以是特定的(例如当地联盟,也就是一个大洲),一个大洲(例如欧洲杯)或两者都不是(例如世界杯)代码优先建模关系
我有一个竞赛类,国家级大陆。国家与大陆之间存在一对多关系。我如何模拟比赛?这似乎不正确
public class Competition{
public int CompetitionID { get; set; }
public int Name { get; set; }
public virtual ICollection<Season> Seasons { get; set; }
public Country? Country { get; set; }
public Continent? Continent { get; set;}
}