I'm getting this error:
The entity or complex type 'Model.Members' cannot be constructed in a LINQ to Entities query.
with my code:
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>();
}