Пример #1
0
        public GetPillarsResponse GetPillars(GetPillarsRequest request)
        {
            int totalRecords;
            var pillars = SortData(request.Search, request.SortingDictionary, out totalRecords);
            if (request.Take != -1)
            {
                pillars = pillars.Skip(request.Skip).Take(request.Take);
            }

            var response = new GetPillarsResponse();
            response.Pillars = pillars.ToList().MapTo<GetPillarsResponse.Pillar>();
            response.TotalRecords = totalRecords;

            return response;
        }
Пример #2
0
        public GetPillarsResponse GetPillars(GetPillarsRequest request)
        {
            var pillars = DataContext.Pillars.ToList();
            var response = new GetPillarsResponse();
            response.Pillars = pillars.MapTo<GetPillarsResponse.Pillar>();

            return response;
        }