Exemplo n.º 1
0
        public IHttpActionResult PostClient(ClientModel clientModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            return(Ok(_clientsService.CreateClient(clientModel)));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreateClient(ClientRequestModel clientRequestModel)
        {
            var createdClient = await _clientsService.CreateClient(clientRequestModel);

            return(CreatedAtRoute("GetClient", new { id = createdClient.Id }, createdClient));
        }
Exemplo n.º 3
0
 public ClientModel PostClient(ClientModel client)
 {
     _clientsService.CreateClient(client?.ToDomain());
     return(client);
 }