コード例 #1
0
        // 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);
        }
コード例 #2
0
        public int GetUsersCount()
        {
            var Id    = _roleManager.GetUserRoleId();
            int count = ListQueryable().Where(x => x.AppRoleId == Id).ToList().Count();

            return(count);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: LogManager.cs プロジェクト: alitekin/nwBlogSolution
        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);
        }