コード例 #1
0
ファイル: ClientesProxy.cs プロジェクト: abrlipac/Diagnostico
        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();
        }
コード例 #2
0
        public async Task <IActionResult> Create(PacienteCreateCommand notification)
        {
            await _mediator.Publish(notification);

            return(Created("", "Se ha creado el paciente correctamente"));
        }
コード例 #3
0
        public async Task <IActionResult> Create(PacienteCreateCommand notification)
        {
            await _clientesProxy.CreateAsync(notification);

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