public ActionResult <ApiResult <IList <TodoListItem> > > GetAll()
        {
            var result = new ApiResult <IList <TodoListItem> >();

            result.Data    = _todoListService.GetAll();
            result.Message = "Todo List";

            return(result);
        }
Example #2
0
        public ActionResult <List <TodoListVm> > GetAll(int userId)
        {
            var user = _userService.Get(userId);

            if (user == null)
            {
                return(NotFound());
            }

            var todoLists = _todoListService.GetAll(userId);

            return(_mapper.Map <List <TodoListVm> >(todoLists));
        }
 public ActionResult <IList <string> > Get()
 {
     return(_todoListService.GetAll().ToList());
 }