我有2个表ROL和用户 与ID用户和IdRol 公开名单SeeRolFromXUser的rolUsers表(INT ID用户)// { LINQ与许多实体许多relatioship
List<string> lisrRP = new List<string>();
var query = from u in contextoBD.Users
where u.IdUsers== Iduser
select u.Roles;//i had to do that but that returns an entity collection i´ dont know haw to get the rol from an x user
foreach (var r in query)
{
lisrRP.Add(r.ToString());
}
return lisrRP;
}
这看起来并不像一个问题。我不确定你在问什么? – 2010-11-24 09:45:36