public IActionResult Index() { var a = taskStore.Save(new TaskBase { Subject = "Hello", Description = "Hello world!" }); return(View()); }
protected override Guid Handle(AddTask request) { ITask task = Task.NewTask(request.Description); _store.Save(task); return(task.Id); }
protected override void Handle(DoTask request) { if (_store.TryFind(request.TaskId, out ITask task)) { task.Do(); _store.Save(task); } }
/// <inheritdoc/> public TaskBase Create(TaskBase task) { return(taskStore.Save(task)); }