Beispiel #1
0
        public async Task <ActionResult <CustomResponsePaged <PaginatedList <Module> > > > GetModules(int?pageIndex, int?pageSize)
        {
            var pageIndexResult = pageIndex ?? 1;
            var pageSizeResult  = pageSize ?? 20;
            var modules         = await _moduleService.GetAsync(pageIndexResult, pageSizeResult);

            modules.ForEach(e => e.LastData = e.ModuleDatas.OrderByDescending(r => r.DateTime).FirstOrDefault());
            return(CustomResponsePaged <Module> .BuildFromPaginatedList(
                       modules
                       ));
        }