File tree 1 file changed +7
-8
lines changed
src/SQLAsyncOutputCacheProvider 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 4
4
using System . Collections . Specialized ;
5
5
using System . Configuration ;
6
6
using System . Data . SqlClient ;
7
+ using System . Data ;
7
8
8
9
class SQLHelper {
9
10
#region Private fields
@@ -43,15 +44,13 @@ PRIMARY KEY NONCLUSTERED
43
44
public SQLHelper ( NameValueCollection config ) {
44
45
ConnectionStringInfo = new ConnectionStringSettings ( config [ "connectionStringName" ] , ConfigurationManager . ConnectionStrings [ config [ "connectionStringName" ] ] . ConnectionString ) ;
45
46
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 ) ;
54
52
}
53
+ config . Remove ( InMemoryTableConfigurationName ) ;
55
54
}
56
55
#endregion
57
56
You can’t perform that action at this time.
0 commit comments