public RolesUserViewModel GetUser ()
        {
            var allusers = context.Users.ToList();
            var users = allusers.Where(x => x.Roles.Select(role => role.RoleId).Contains(getRoleId("User"))).ToList();
            var userVM = users.Select(user => new UserViewModel { UserName = user.UserName, Roles = string.Join(",", getRoleName(user.Roles.Select(role => role.RoleId).ElementAt(0))) }).ToList();

            var admins = allusers.Where(x => x.Roles.Select(role => role.RoleId).Contains(getRoleId("Admin"))).ToList();
            var adminsVM = admins.Select(user => new UserViewModel { UserName = user.UserName, Roles = string.Join(",", getRoleName(user.Roles.Select(role => role.RoleId).ElementAt(0))) }).ToList();

            var nonroles = noRole();
            var nonrolesVM = nonroles.Select(user => new UserViewModel { UserName = user.UserName, Roles = "NoRole" }).ToList();

            var model = new RolesUserViewModel { Users = userVM, Admins = adminsVM, NonRoles = nonrolesVM};

            return model;

        }
 public ActionResult Accounts(string searchTerm)
 {
     RolesUserViewModel l = new RolesUserViewModel();
     var list = context.Roles.OrderBy(r => r.Name).ToList().Select(rr => new SelectListItem { Value = rr.Name.ToString(), Text = rr.Name }).ToList();
     ViewBag.Roles = list;
     if (string.IsNullOrEmpty(searchTerm))
     {
         l = GetUser();
     }
     else
     {
         l = GetUserSearch(searchTerm);
     }
     return View(l);
 }