コード例 #1
0
        public async Task <ActionResult <Todo> > Post([FromBody] Todo todo)
        {
            todo.Id = $"{Guid.NewGuid()}";

            await _eventConsumerService.SendTodo(todo);

            return(CreatedAtAction(nameof(Get), new { id = todo.Id }, todo));
        }