コード例 #1
0
        public ActionResult <ApiResult <IList <TodoListItem> > > GetAll()
        {
            var result = new ApiResult <IList <TodoListItem> >();

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

            return(result);
        }
コード例 #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));
        }
コード例 #3
0
 public ActionResult <IList <string> > Get()
 {
     return(_todoListService.GetAll().ToList());
 }