/// <summary>
/// 课程类型
/// </summary>
public class CourseType : EntityBase<int>
{
public string Name { get; set; }
public string Remark { get; set; }
/// <summary>
/// 问卷
/// </summary>
public virtual Questionnaire Questionnaire { get; set; }
public virtual School School { get; set; }
public virtual IQueryable<Course> Course { get; set; }
}
public class Course : EntityBase<int>
{
[NotMapped]
public const string TableName = "Courses";
public string Name { get; set; }
public string Remark { get; set; }
/// <summary>
/// 点击量
/// </summary>
public int Count { get; set; }
/// <summary>
/// 可选人数
/// </summary>
public int AvailableCount { get; set; }
public virtual List<GradeTable> Grade { get; set; }
/// <summary>
/// 课程类型
/// </summary>
public CourseType Type { get; set; }
/// <summary>
/// 所有年级
/// </summary>
[NotMapped]
public IQueryable<GradeTable> AllGrade { get; set; }
public virtual List<Course_Period> Course_Period { get; set; }
public virtual IQueryable<Course_Extend> Course_Extend { get; set; }
}
查询代码:
A specified Include path is not valid. The EntityType 'DAL.CourseType' does not declare a navigation property with the name 'Course'.
这个问题怎么解决啊
没有园豆了,知道的帮个忙吧
好像是你的lambda表达式没写对
不是这个原因,我解决了。:)
@冀乔楚: 怎么解决的?