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)); } }
public ActionResult Index() { var toDoViewModel = Mapper.Map <IEnumerable <ToDo>, IEnumerable <ToDoViewModel> >(_toDoAppService.GetAll()); return(View(toDoViewModel)); }