public IEnumerable <T> GetAll <T>() where T : class { if (CurrentTransaction != null) { return(DbExecProxy <IEnumerable <T> >((param) => CurrentConnection.GetAll <T>(CurrentTransaction, CommandTimeout), "get all", null)); } using var connection = GetDbConnection(DataSourceEnum.SLAVE); return(DbExecProxy <IEnumerable <T> >((param) => connection.GetAll <T>(CurrentTransaction, CommandTimeout), "get all", null)); }