编辑我的存储库类时弹出错误
var applicantList = (from a in context.Profiles
join app in context.APPLICANTs
on a.PROFILE_ID equals app.Profile_id into joined
from j in joined.DefaultIfEmpty()//.OrderBy(v => v.APPLICANT_ID)
select j //<-- this is APPLICANTs type
).Take(1000);
applicantdata = applicantList
.SelectMany(c => c.APPLICANTs) //this line added
.AsQueryable().OrderBy(v => v.APPLICANT_ID).ToList();
if (applicantdata.Any())
{
Cache.Set("applicants", applicantdata, 30);
}
}
return applicantdata;
我有一个例外
.SelectMany(c => c.APPLICANTs) //this line added
说:
无法从用法中推断方法“System.Linq.Queryable.SelectMany(System.Linq.IQueryable, System.Linq.Expressions.Expression>>)”的类型参数。尝试明确指定类型参数