Example #1
0
        public Task <xxxEntity> CreateXxxEntity(CreateXxxCommand command)
        {
            //db process

            xxxEntity entity = new xxxEntity {
                id = "a", name = "John", age = 18
            };

            return(Task.FromResult(entity));
        }
 public async Task <IActionResult> CreateClient([FromBody] CreateXxxCommand command)
 {
     return(Ok(await Mediator.Send(command)));
 }