Exemple #1
0
        public IList <UserTopViewModel> GetTopUsers()
        {
            var parameters = new QueryParameters
            {
                SortSettings = SortSettingsBuilder <User> .Create()
                               .DescendingBy(x => x.Rating)
                               .GetSettings(),

                PageRule = new PageRule
                {
                    Count = 10,
                    Start = 0
                }
            };

            var users = unitOfWork.GetAll <User>(parameters);

            return(mapper.Map <List <UserTopViewModel> >(users));
        }