OpenJudgeSystem icon indicating copy to clipboard operation
OpenJudgeSystem copied to clipboard

ForeignKey Attribute

Open dimiste opened this issue 6 years ago • 0 comments

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

dimiste avatar May 01 '19 12:05 dimiste