I am using entity framework in C# with the following code.
public List<UserSessionModell> getSessions()
{
var result = (from x in db.users
from y in db.psw
from z in db.users_data
from t in db.user_roles
from u in db.roles
select new UserSessionModell
{
User_id = x.id,
UserName = x.username,
Password = y.psw1,
Work_id = z.IsEmployedAt,
Role = t.role,
RoleName = u.id.ToString()
}).ToList();
return result;
}
The tables in question are connected as follows:

Every property receives the correct data except from the "roles" table which always gets the last record in the table. Please help, what can be the reason?