Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create(PacienteCreateCommand notification)
        {
            await _mediator.Publish(notification);

            return(Created("", "Se ha creado el paciente correctamente"));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Create(PacienteCreateCommand notification)
        {
            await _clientesProxy.CreateAsync(notification);

            return(Created("", "Se ha creado el paciente correctamente"));
        }