0
我得到這個錯誤:實體框架查詢錯誤?
The entity or complex type 'Model.Members' cannot be constructed in a LINQ to Entities query.
我的代碼:
public List<Members> getTeamMembers(String tem_reference)
{
var query = from c in cecbContext.Projects
join b in cecbContext.TeamMembers on c.proj_team equals b.team_reference
join d in cecbContext.Members on b.mem_reference equals d.mem_reference
where c.proj_reference == tem_reference
select new Members
{
mem_reference = d.mem_reference
};
return query.ToList<Members>();
}