In entity framework i have two table (two entities): People and Role with one to many relationship. In the People tables i have a navigation property to Role:
public virtual ICollection<Role> Roles { get; set; }
I'm able to retrieve all people that have role as 'barman':
var listPeople = (from p in SiContext.People
where p.Roles.Any(x => x.Name == "barman")
select p).ToList();
How can i retrieve all people with the related role? I want the person name and surname and the role name (that is in the role table)
Thanks