public async Task <IActionResult> Post([FromBody] RegisterInput input) { var patient = new Patient { Id = input.Id, BirthDate = input.BirthDate, Email = input.Email, FirstName = input.FirstName, LastName = input.LastName, Illness = input.Illness, }; var result = await _patientsService.AddPatient(patient); return(CreatedAtAction($"{result.State}", new { result.Entity })); }
public async Task <ActionResult <Guid> > PostPatient([FromBody] Patient patient) { var id = _patientsService.AddPatient(patient); return(StatusCode(201, new { Id = id })); }