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(); }
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()); }