public List <AppUser> GetAllRoleAuthorUsers() { var roleId = _roleManager.GetAuthorUserRoleId(); var usersList = _userRoleManager.ListQueryable().Where(x => x.AppRoleId == roleId).Select(u => u.AppUser).ToList(); return(usersList); }
public int GetAuthorUserCount() { var Id = _roleManager.GetAuthorUserRoleId(); int count = ListQueryable().Where(x => x.AppRoleId == Id).ToList().Count(); return(count); }
public List <LastVisit> GetAllAuthorUsersVisits() { var roleId = _roleManager.GetAuthorUserRoleId(); var usersId = _userRoleManager.ListQueryable().Where(x => x.AppRoleId == roleId).Select(u => u.AppUserId).ToList(); var visistsList = ListQueryable().Where(x => usersId.Contains(x.AppUserId)).ToList(); return(visistsList); }
public List <Log> GetAllAuthorUsersLogs() { var roleId = _roleManager.GetAuthorUserRoleId(); 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); }