public async Task <TodoList> Handle(CreateTodoListRequest request) { var todoList = new TodoList { Title = request.Title, CreatedBy = request.User.Identity.Name }; context.Add(todoList); await context.SaveChangesAsync(); return(todoList); }
public Task <TodoList> CreateList(CreateTodoListRequest request, IRequestHandler <CreateTodoListRequest, TodoList> handler) { return(handler.Handle(request)); }