Query:
- string[] roles =( from usr in dataBaseEntities.Users
- join uir in dataBaseEntities.UserInRoles
- on usr.UserId equals uir.UserId
- join rl in dataBaseEntities.Roles
- on uir.RoleId equals rl.RoleId
- where usr.UserId==user.UserId
- select new { rl.RoleName }). AsEnumerable().Select(x => string.Format("{0}", x.RoleName)).ToArray();
Output: It will give all the roles assigned to the Particular user based on usedId.