public async Task CreateAsync(PacienteCreateCommand command) { var content = new StringContent( JsonSerializer.Serialize(command), Encoding.UTF8, "application/json" ); var request = await _httpClient.PostAsync($"{_apiUrls.ClientesUrl}pacientes", content); request.EnsureSuccessStatusCode(); }
public async Task <IActionResult> Create(PacienteCreateCommand notification) { await _mediator.Publish(notification); return(Created("", "Se ha creado el paciente correctamente")); }
public async Task <IActionResult> Create(PacienteCreateCommand notification) { await _clientesProxy.CreateAsync(notification); return(Created("", "Se ha creado el paciente correctamente")); }