NikolayIT / OpenJudgeSystem

An open source system for online algorithm competitions for Windows, written in ASP.NET MVC
http://bgcoder.com
GNU General Public License v2.0
514 stars 94 forks source link

ForeignKey Attribute #543

Open dimiste opened 5 years ago

dimiste commented 5 years ago

Why in model class "ContestQuestion" at the property "ContestId" we have "ForeignKey" Attribute

[ForeignKey("Contest")]
public int ContestId { get; set; }

public virtual Contest Contest { get; set; }

and the other model class "Contest" at the property "CategoryId" we haven't?

public int? CategoryId { get; set; }

public virtual ContestCategory Category { get; set; }