1
1
using System . Collections . Generic ;
2
- using Iesi . Collections . Generic ;
2
+ using System . Linq ;
3
3
using NHibernate . Cfg ;
4
4
using NHibernate . Engine ;
5
5
using NHibernate . Mapping ;
@@ -35,7 +35,7 @@ public void CanRetrieveReservedWords()
35
35
[ Test ]
36
36
public void UpdateReservedWordsInDialect ( )
37
37
{
38
- var reservedDb = new HashedSet < string > ( ) ;
38
+ var reservedDb = new HashSet < string > ( ) ;
39
39
var configuration = TestConfigurationHelper . GetDefaultConfiguration ( ) ;
40
40
var dialect = Dialect . Dialect . GetDialect ( configuration . Properties ) ;
41
41
var connectionHelper = new ManagedProviderConnectionHelper ( configuration . Properties ) ;
@@ -97,7 +97,7 @@ public void AutoQuoteTableAndColumnsAtStratup()
97
97
[ Test ]
98
98
public void AutoQuoteTableAndColumnsAtStratupIncludeKeyWordsImport ( )
99
99
{
100
- var reservedDb = new HashedSet < string > ( ) ;
100
+ var reservedDb = new HashSet < string > ( ) ;
101
101
var configuration = TestConfigurationHelper . GetDefaultConfiguration ( ) ;
102
102
var dialect = Dialect . Dialect . GetDialect ( configuration . Properties ) ;
103
103
var connectionHelper = new ManagedProviderConnectionHelper ( configuration . Properties ) ;
@@ -123,18 +123,9 @@ public void AutoQuoteTableAndColumnsAtStratupIncludeKeyWordsImport()
123
123
Assert . That ( match , Is . EquivalentTo ( reservedDb ) ) ;
124
124
}
125
125
126
- private static Column GetColumnByName ( IEnumerable < Column > culs , string colName )
126
+ private static Column GetColumnByName ( IEnumerable < Column > columns , string colName )
127
127
{
128
- Column result = null ;
129
- foreach ( var column in culs )
130
- {
131
- if ( column . Name . Equals ( colName ) )
132
- {
133
- result = column ;
134
- break ;
135
- }
136
- }
137
- return result ;
128
+ return columns . FirstOrDefault ( column => column . Name . Equals ( colName ) ) ;
138
129
}
139
130
140
131
[ Test ]
0 commit comments