// Admin public List <AppUser> GetAllRoleUsers() { var roleId = _roleManager.GetUserRoleId(); var usersList = _userRoleManager.ListQueryable().Where(x => x.AppRoleId == roleId).Select(u => u.AppUser).ToList(); return(usersList); }
public int GetUsersCount() { var Id = _roleManager.GetUserRoleId(); int count = ListQueryable().Where(x => x.AppRoleId == Id).ToList().Count(); return(count); }
public List <LastVisit> GetAllUsersVisits() { var roleId = _roleManager.GetUserRoleId(); var usersId = _userRoleManager.ListQueryable().Where(x => x.AppRoleId == roleId).Select(u => u.AppUserId).ToList(); var visistList = ListQueryable().Where(x => usersId.Contains(x.AppUserId)).ToList(); return(visistList); }
public List <Log> GetAllUsersLogs() { var roleId = _roleManager.GetUserRoleId(); var userName = _userRoleManager.ListQueryable().Where(x => x.AppRoleId == roleId).Select(u => u.AppUser.Username).ToList(); var logList = ListQueryable().Where(x => userName.Contains(x.Username)).ToList(); return(logList); }