public dynamic Update(dynamic @params) { var todo = todos.Single(@params.Id); todo.SetMembers(Todo(@params)); todos.Save(todo); return(Get(todo.Id)); }
public async Task OnTodoCompletedAsync(TodoCompletedEvent @event) { var todo = Todos.Single(t => t.Id == @event.TodoId); todo.IsCompleted = true; await Task.CompletedTask; }
public void OnTodoUpdated(TodoUpdatedEvent @event) { var todo = Todos.Single(t => t.Id == @event.TodoId); todo.Text = @event.Text; }