public IHttpActionResult AddPatientAllergy(Models.MedicalRecordBindingModel model) { try { var result = _patientData.AddPatientAllergy(model.IdPatient, Convert.ToDateTime(model.StartTime), model.Allergy); return(Ok(result)); } catch (Exception e) { Console.WriteLine(e); throw; } }