/// <summary> /// 呼叫 初始化DB 的method /// </summary> private void DBInitial() { log.Info($"資料庫初始化..."); try { var apiResult = new DataServices.DataServices().GetDataFromAPI(); ClinicRoomService.ClearClinic(); DoctorService.ClearDoctor(); SystemConfigService.Init(); ClinicRoomService.Init(apiResult.Result.ClinicRoom); DoctorService.Init(apiResult.Result.Doctor); } catch (Exception ex) { log.Error(ex.ToString()); } log.Info($"資料庫初始化完成..."); }