我有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