public override string[] GetRolesForUser(string user_name) { using (ClothesEntities db = new ClothesEntities()) { var useraccount = db.Users.FirstOrDefault(x => x.UserName == user_name); if (useraccount == null) { return(null); } else { string[] listQuyen = useraccount.UserRoles.Select(x => x.Role.RoleName).ToArray(); return(listQuyen); } } }