public async Task <IActionResult> Post([FromBody] TodoListRequest todoListDto) { var user = await _userManager.FindByNameAsync(User.Identity.Name); var todoList = new TodoList { Name = todoListDto.Name, Created = DateTime.UtcNow, User = user }; await _todoListService.CreateTodoList(todoList); return(Ok(todoListDto.Name)); }
public object Get(TodoListRequest request) { return CreateListAndCall(list => { return list.Items.ToList(); }); }