public ActionResult <IEnumerable <PatientReadDTO> > CreatePatients([FromBody] IEnumerable <Patient> pat) { _repository.CreatePatients(pat); _repository.SaveChanges(); var patients = _mapper.Map <IEnumerable <PatientReadDTO> >(pat); return(Created("https://cotecapi.com/patients", patients)); }