public Task <Todo> AddOrUpdate([FromBody] AddOrUpdateTodoCommand command, CancellationToken cancellationToken = default)
 => _todos.AddOrUpdate(command.UseDefaultSession(_sessionResolver), cancellationToken);
Esempio n. 2
0
 public Task <Todo> AddOrUpdate([FromBody] AddOrUpdateTodoCommand command, CancellationToken cancellationToken = default)
 {
     command.UseDefaultSession(_sessionResolver);
     return(_todoService.AddOrUpdate(command, cancellationToken));
 }
Esempio n. 3
0
        public async Task <IActionResult> Add([FromBody] TodoItem item)
        {
            var result = await service.AddOrUpdate(item);

            return(Ok(result));
        }