public Patient UpdatePatient([RestMessage(RestMessageFormat.SimpleJson)] Patient patientToUpdate) { IPatientRepositoryService repository = ApplicationContext.Current.GetService <IPatientRepositoryService>(); patientToUpdate.VersionKey = null; // Get all the acts if none were supplied, and all of the relationships if none were supplied return(repository.Save(patientToUpdate).GetLocked() as Patient); }
public Patient CreatePatient([RestMessage(RestMessageFormat.SimpleJson)] Patient patientToInsert) { IPatientRepositoryService repository = ApplicationContext.Current.GetService <IPatientRepositoryService>(); return(repository.Insert(patientToInsert).GetLocked() as Patient); }
/// <summary> /// Resource handler subscription /// </summary> public PatientResourceHandler() { ApplicationServiceContext.Current.Started += (o, e) => this.repository = ApplicationServiceContext.Current.GetService <IPatientRepositoryService>(); }