Пример #1
0
        public IEnumerable <QuotaIndexViewModel> Get(int skip, int pageSize, int quotaId)
        {
            List <Quota> items = _quotaService
                                 .GetAll()
                                 .Include(x => x.BossUser)
                                 .Include(x => x.Department)
                                 .Include(x => x.OperatorUser)
                                 .Where(x => x.Id == quotaId)
                                 .OrderByDescending(x => x.Id)
                                 .Skip(skip)
                                 .Take(pageSize)
                                 .ToList();
            var models = Mapper.Map <IList <Quota>, IList <QuotaIndexViewModel> >(items);

            return(models);
        }