Esempio n. 1
0
        public async Task <IActionResult> GetAll()
        {
            try
            {
                var result = await _appService.GetAll();

                return(Response(result));
            }
            catch (Exception ex)
            {
                _logger.LogError("ERROR: {message}", ex.Message);
                return(BadRequest(ex));
            }
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            var toDoViewModel = Mapper.Map <IEnumerable <ToDo>, IEnumerable <ToDoViewModel> >(_toDoAppService.GetAll());

            return(View(toDoViewModel));
        }