コード例 #1
0
 public IEnumerable <TodoViewModel> Get()
 {
     try
     {
         return(Mapper.Map <IEnumerable <Todo>, IEnumerable <TodoViewModel> >(_todoApp.GetAll()));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        public async Task <IActionResult> Index()
        {
            var output = await _todoAppService.GetAll(
                new PagedAndSortedResultRequestDto()
                );

            return(View(output));
        }
コード例 #3
0
 public async Task <IEnumerable <TodoAppViewModel> > Get()
 {
     return(await _todoAppService.GetAll());
 }
コード例 #4
0
 public IActionResult Index()
 {
     return(View(TodoAppService.GetAll()));
 }
コード例 #5
0
 public async Task <IActionResult> Index(int?pageNumber)
 {
     return(View(await PaginatedList <TodoAppViewModel> .CreateAsync(_todoAppService.GetAll().Result, pageNumber ?? 1, 4)));
 }