Пример #1
0
        public IActionResult Post([FromBody] PatientModel newPatient)
        {
            var dbPath = DbOps.GetDbPath();

            if (newPatient.Equals(null))
            {
                return(BadRequest());
            }
            var patientModelData = this._occupancyService.AddNewPatient(newPatient, dbPath);

            if (patientModelData.Equals(HttpStatusCode.InternalServerError))
            {
                return(BadRequest());
            }
            return(Ok(patientModelData));
        }