The error message should be helpful, you are setting p_type to a type (ICollection<T>
) instead of a variable, you need to change to this:
var pOver = (from c in db.pr_d
select new ProjOverview
{
name=c.proj.name,
proj_id=c.proj.p_id,
p_type= c.p_type_variable
}).Take(7);
return pOver;
I've also noticed that you used pOver as a class name, maybe you meant to use ProjOverview?