public IHttpActionResult PostClient(ClientModel clientModel) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(_clientsService.CreateClient(clientModel))); }
public async Task <IActionResult> CreateClient(ClientRequestModel clientRequestModel) { var createdClient = await _clientsService.CreateClient(clientRequestModel); return(CreatedAtRoute("GetClient", new { id = createdClient.Id }, createdClient)); }
public ClientModel PostClient(ClientModel client) { _clientsService.CreateClient(client?.ToDomain()); return(client); }