///<summary> ///This method makes a sql call and returns all patients in the db ///</summary> ///<param name="config">The configuration object</param> ///<returns>List{Patient}</returns> static List <Patient> fetchFromSql(IConfigurationRoot config) { using (var db = new AccTestContext(config)) { var list = db.Patient.Select(p => p).ToList(); Logger.log("runLogger", list.Count().ToString() + " patients pulled from db"); return(list); } }
///<summary> ///This method makes a sql call and grabs any Patients that have been edited in the last 24hrs ///</summary> ///<param name="config">The configuration object</param> ///<returns>List{Patient}</returns> static List <Patient> fetchChangelist(IConfigurationRoot config) { using (var db = new AccTestContext(config)) { var list = db.Patient.Select(p => p) //.Where(p => p.TodaysDate > DateTime.Now.AddHours(-24)).ToList(); .ToList(); Logger.log("changeLog", list.Count().ToString()); return(list); } }