阅读背景:

在LINQ查询中应用group by,将丢失进一步连接所需的信息

来源:互联网 

I have the following models:

我有以下模型:

public class Course
{
    public int Id { get; set; }
    public string Name { get; set; }
}

public class Course_TutionCenter
{
    public int Id { get; set; }
    public int CourseId { get; set; }
    public int TutionCenterId { get; set; }

    [ForeignKey("CourseId")]
    public virtual Course Course { get; set; }

    [ForeignKey("TutionCenterId")]
    public virtual TutionCenter TutionCenter { get; set; }
}

public class CourseStudent
{
    public int Id { get; set; }
    public int Course_TutionCenter_Id { get; set; }

    [ForeignKey("Course_TutionCenter_Id")]
    public virtual Course_TutionCenter Course_TutionCenter { get; set; }
}
public



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: