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