示例#1
0
        public IHttpActionResult PostClient(ClientModel clientModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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