Пример #1
0
        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);
        }
Пример #2
0
 public Task <TodoList> CreateList(CreateTodoListRequest request,
                                   IRequestHandler <CreateTodoListRequest, TodoList> handler)
 {
     return(handler.Handle(request));
 }