public IActionResult Index()
        {
            var a = taskStore.Save(new TaskBase {
                Subject = "Hello", Description = "Hello world!"
            });

            return(View());
        }
Beispiel #2
0
    protected override Guid Handle(AddTask request)
    {
        ITask task = Task.NewTask(request.Description);

        _store.Save(task);

        return(task.Id);
    }
Beispiel #3
0
    protected override void Handle(DoTask request)
    {
        if (_store.TryFind(request.TaskId, out ITask task))
        {
            task.Do();

            _store.Save(task);
        }
    }
Beispiel #4
0
 /// <inheritdoc/>
 public TaskBase Create(TaskBase task)
 {
     return(taskStore.Save(task));
 }