Beispiel #1
0
        public async Task CreateAsync(EmpleadoCreateCommand command)
        {
            var content = new StringContent(
                JsonSerializer.Serialize(command),
                Encoding.UTF8,
                "application/json"
                );

            var request = await _httpClient.PostAsync($"{_apiUrls.PersonalUrl}empleados", content);

            request.EnsureSuccessStatusCode();
        }
Beispiel #2
0
        public async Task <IActionResult> Create(EmpleadoCreateCommand notification)
        {
            await _personalProxy.CreateAsync(notification);

            return(Ok());
        }
        public async Task <IActionResult> Create(EmpleadoCreateCommand notification)
        {
            await _mediator.Publish(notification);

            return(Ok());
        }