コード例 #1
0
        public async Task <IActionResult> Index()
        {
            var response = new HomeViewModel();

            try {
                response = await _homeService.RecuperarDadosIniciaisHomeAsync();
            } catch (Exception e) {
                return(CreateServerErrorResponse(e));
            }

            return(CreateResponse(response));
        }
コード例 #2
0
        public async Task <IActionResult> Index()
        {
            var homeViewModel = await _homeService.RecuperarDadosIniciaisHomeAsync();

            return(View(homeViewModel));
        }
コード例 #3
0
        public Task <HomeViewModel> ServiceRetornaDadosValidos(IHomeInfoService homeService)
        {
            var dadosIniciaisHome = homeService.RecuperarDadosIniciaisHomeAsync();

            return(dadosIniciaisHome);
        }