File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/SQLAsyncOutputCacheProvider Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 44 using System . Collections . Specialized ;
55 using System . Configuration ;
66 using System . Data . SqlClient ;
7+ using System . Data ;
78
89 class SQLHelper {
910 #region Private fields
@@ -43,15 +44,13 @@ PRIMARY KEY NONCLUSTERED
4344 public SQLHelper ( NameValueCollection config ) {
4445 ConnectionStringInfo = new ConnectionStringSettings ( config [ "connectionStringName" ] , ConfigurationManager . ConnectionStrings [ config [ "connectionStringName" ] ] . ConnectionString ) ;
4546 var useInMemoryTable = false ;
46- if ( config [ InMemoryTableConfigurationName ] != null ) {
47- if ( bool . TryParse ( config [ InMemoryTableConfigurationName ] , out useInMemoryTable ) && useInMemoryTable ) {
48- CreatTableIfNotExists ( CreateInMemoryOutputCacheTableSql ) ;
49- }
50- else {
51- CreatTableIfNotExists ( CreateOutputCacheTableSql ) ;
52- }
53- config . Remove ( InMemoryTableConfigurationName ) ;
47+ if ( bool . TryParse ( config [ InMemoryTableConfigurationName ] , out useInMemoryTable ) && useInMemoryTable ) {
48+ CreatTableIfNotExists ( CreateInMemoryOutputCacheTableSql ) ;
49+ }
50+ else {
51+ CreatTableIfNotExists ( CreateOutputCacheTableSql ) ;
5452 }
53+ config . Remove ( InMemoryTableConfigurationName ) ;
5554 }
5655 #endregion
5756
You can’t perform that action at this time.
0 commit comments