Exemplo n.º 1
0
        public async Task <IActionResult> Create([FromBody] CreateClientContract contract)
        {
            var result = await mediator.Send(new CreateClientCommand(contract));

            if (result.ErrorModels?.Count > 0)
            {
                return(new BadRequestObjectResult(result.ErrorModels));
            }
            return(Ok());
        }
Exemplo n.º 2
0
 public CreateClientCommand(CreateClientContract createClientContract)
 {
     CreateClientContract = createClientContract;
 }