[Required(ErrorMessage = "省份不能为空")]
//[NavigationAttribute]
public string ProvinceCode { get; set; }
[NavigationAttribute("ProvinceCode")]
public SystemManage.AreaEntity ProvinceEntity { get; set; }
查询语句是:
var query = repository.IQueryable().IncludeMany(b=>b.ProvinceCode).Where(a => a.F_DeleteMark == false);
然后运行代码,就提示:
'ProvinceCode' is not navigation property.
我的实体这样定义的: [ColumnAttribute("F_Id", IsPrimaryKey = true)] public string F_Id { get; set; }
查询语句是: var query = repository.IQueryable().IncludeMany(b=>b.ProvinceCode).Where(a => a.F_DeleteMark == false); 然后运行代码,就提示: 'ProvinceCode' is not navigation property.
请问要怎么设置才能自动把省份数据查出来?