public static bool Init(ISqlConnModel sqlConn) { bool flag; MysqlHelper.MysqlConn = sqlConn.MysqlConn; MssqlHelper.ConnCommon = sqlConn.MssqlConn; flag = FrameOperaters.Init(); return(flag); }
public static bool Init(ISqlConnModel sqlConn) { bool flag; MysqlHelper.MysqlConn = sqlConn.MysqlConn; MssqlHelper.ConnCommon = sqlConn.MssqlConn; WcfInvoke.TlgChinaServiceUrl = sqlConn.TlgChinaServiceUrl; WcfInvoke.LstechServiceUrl = sqlConn.LstechServiceUrl; flag = FrameOperaters.Init(); flag = HealthPcOperaters.Init(); flag = HealthMobileOperaters.Init(); flag = WCFOperators.Init(); return(flag); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IInitialManager manager, ISqlConnModel conn) { conn.MysqlConn = Configuration["ConnectionStrings:MysqlConn"]; conn.MssqlConn = Configuration["ConnectionStrings:MssqlConn"]; conn.TlgChinaServiceUrl = Configuration["WcfWebUrls:TlgChinaUrl"]; conn.LstechServiceUrl = Configuration["WcfWebUrls:LstechUrl"]; if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } //启用跨域 app.UseCors(builder => { builder.AllowAnyOrigin(); builder.AllowAnyHeader(); builder.AllowAnyMethod(); }); app.UseRouting(); //请求错误提示配置 app.UseErrorHandling(); //使用认证授权 app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); //初始化 manager.InitData(conn); }
public bool InitData(ISqlConnModel model) { return(InitOperators.Init(model)); }