예제 #1
0
        public async Task <ActionResult <IEnumerable <DiaryDto> > > GetEntitys(int pageIndex, int pageSize, bool isAsc)
        {
            int totalCount = 0;
            var diarys     = await diaryService.GetEntityForPage(pageIndex, pageSize, out totalCount, u => true, u => u.UsersId, isAsc).ToArrayAsync();

            if (diarys.Count() == 0)
            {
                return(NotFound());
            }
            var ToDiaryDto = mapper.Map <IEnumerable <DiaryDto> >(diarys);

            return(Ok(ToDiaryDto));
        }