public IActionResult AddPatient([FromBody] Patient patient) { Log.Information($"Adding new patient {patient.FullName}"); var newPatient = _patientBusiness.AddPatient(patient); if (newPatient == null) { Log.Warning("Bad Request - patient was not added"); return(BadRequest()); } Log.Information("Patient was added"); _distributedCache.Remove("Patients"); return(Created(nameof(GetPatient), newPatient)); }
public async Task Post([FromBody] Patient patient) { await _patientBusiness.AddPatient(patient); }