Example #1
0
        public List <UserDTO> GetUsers()
        {
            var users       = _unitOfWork.UsersManager.Users.ToList();
            var usersMapped = UserDTOHelper.EntitiesToDTO(users);

            return(usersMapped);
        }
Example #2
0
        public List <UserDTO> GetPaged(int pageNumber, int pageSize)
        {
            int skip  = (pageNumber - 1) * pageSize;
            var users = _unitOfWork.UsersManager.Users
                        .OrderBy(c => c.Id)
                        .Skip(skip)
                        .Take(pageSize)
                        .ToList();
            var usersMapped = UserDTOHelper.EntitiesToDTO(users);

            return(usersMapped);
        }