/// <summary> /// Configuration /// </summary> /// <param name="app"></param> public void Configuration(IAppBuilder app) { //指定Hangfire使用内存存储后台任务信息 GlobalConfiguration.Configuration.UseMemoryStorage(); //启用HangfireServer这个中间件(它会自动释放) app.UseHangfireServer(); //启用Hangfire的仪表盘(可以看到任务的状态,进度等信息) app.UseHangfireDashboard(); FrameworkLog.LogModel.LogHelper.WriteInfoLog("数据同步任务启动..."); new EBJobScheduler(DapperProvider.GetConnString()).Start(); }
public BaseRepository(SqlServerProvider provider, OperateInfo oInfo = null) { _provider = provider ?? DapperProvider.GetProvider(DapperProvider.GetConnString()); _oInfo = oInfo; }
protected Service(string connString) { this.Provider = DapperProvider.GetProvider(string.IsNullOrEmpty(connString) ? DapperProvider.GetConnString() : connString); }
protected Service(Service service) { this.Provider = service?.GetProvider() ?? DapperProvider.GetProvider(DapperProvider.GetConnString()); }
/// <summary> /// 链接字符串写在配置文件里 /// 仅适用本项目WebApi,其他用途,请修改此处代码 /// </summary> protected Service() { this.Provider = DapperProvider.GetProvider(DapperProvider.GetConnString()); }