public RepositoryBase() { _dal.ExecutedEvent += ExecutedEvent; _logOptions = ConfigurtaionManager.AppSettings <LogOptions>("logging"); _logger = new DefaultLogger(_logOptions.Host, _logOptions.Port, _logOptions.Scheme); }
public DapperExtension() { _sqlStringCache = _sqlStringCache ?? new Dictionary <string, Dictionary <SqlStringType, string> >(); _connectionString = ConfigurtaionManager.AppSettings(_defaultConnectionStringKey); _databaseType = ConfigurtaionManager.AppSettings(_defaultDatabaseTypeKey); }
/// <summary> /// 重定向 /// </summary> /// <param name="context"></param> private void RedirectLoginSite(HttpContext context) { string loaction = ConfigurtaionManager.AppSettings("LoginUri"); string currentRequestUri = context.Request.GetAbsoluteUri(); string fullUri = $"{loaction}?returnuri={currentRequestUri}"; context.Response.Redirect(fullUri); }
private IConnectionFactory GetConnectionFactory() { var factory = new ConnectionFactory(); //RabbitMQ服务在本地运行 factory.HostName = ConfigurtaionManager.AppSettings("RabbitHost"); //用户名 factory.UserName = ConfigurtaionManager.AppSettings("RabbitUserName"); //密码 factory.Password = ConfigurtaionManager.AppSettings("RabbitPassword"); return(factory); }
public DapperExtension() { _sqlStringCache = _sqlStringCache ?? new Dictionary <string, Dictionary <SqlStringType, string> >(); _objectPropertyCache = _objectPropertyCache ?? new Dictionary <string, PropertyInfo[]>(); _connectionString = ConfigurtaionManager.AppSettings(_defaultConnectionStringKey); var dbType = ConfigurtaionManager.AppSettings(_defaultDatabaseTypeKey); if (!string.IsNullOrWhiteSpace(dbType)) { _dbType = (DBType)int.Parse(dbType); } }