1515using System . Text . RegularExpressions ;
1616using NHibernate . Dialect ;
1717using NHibernate . DomainModel . Northwind . Entities ;
18- using NHibernate . Driver ;
1918using NHibernate . Linq ;
2019using NUnit . Framework ;
2120
@@ -562,7 +561,7 @@ public async Task GroupByComputedValueAsync()
562561 {
563562 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
564563 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
565- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
564+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
566565 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
567566
568567 var orderGroups = await ( db . Orders . GroupBy ( o => o . Customer . CustomerId == null ? 0 : 1 ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -574,7 +573,7 @@ public async Task GroupByComputedValueInAnonymousTypeAsync()
574573 {
575574 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
576575 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
577- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
576+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
578577 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
579578
580579 var orderGroups = await ( db . Orders . GroupBy ( o => new { Key = o . Customer . CustomerId == null ? 0 : 1 } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -586,7 +585,7 @@ public async Task GroupByComputedValueInObjectArrayAsync()
586585 {
587586 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
588587 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
589- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
588+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
590589 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
591590
592591 var orderGroups = await ( db . Orders . GroupBy ( o => new [ ] { o . Customer . CustomerId == null ? 0 : 1 , } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -715,7 +714,7 @@ public async Task GroupByComputedValueWithJoinOnObjectAsync()
715714 {
716715 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
717716 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
718- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
717+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
719718 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
720719
721720 var orderGroups = await ( db . OrderLines . GroupBy ( o => o . Order . Customer == null ? 0 : 1 ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -727,7 +726,7 @@ public async Task GroupByComputedValueWithJoinOnIdAsync()
727726 {
728727 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
729728 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
730- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
729+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
731730 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
732731
733732 var orderGroups = await ( db . OrderLines . GroupBy ( o => o . Order . Customer . CustomerId == null ? 0 : 1 ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -739,7 +738,7 @@ public async Task GroupByComputedValueInAnonymousTypeWithJoinOnObjectAsync()
739738 {
740739 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
741740 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
742- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
741+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
743742 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
744743
745744 var orderGroups = await ( db . OrderLines . GroupBy ( o => new { Key = o . Order . Customer == null ? 0 : 1 } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -751,7 +750,7 @@ public async Task GroupByComputedValueInAnonymousTypeWithJoinOnIdAsync()
751750 {
752751 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
753752 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
754- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
753+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
755754 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
756755
757756 var orderGroups = await ( db . OrderLines . GroupBy ( o => new { Key = o . Order . Customer . CustomerId == null ? 0 : 1 } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -763,7 +762,7 @@ public async Task GroupByComputedValueInObjectArrayWithJoinOnObjectAsync()
763762 {
764763 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
765764 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
766- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
765+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
767766 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
768767
769768 var orderGroups = await ( db . OrderLines . GroupBy ( o => new [ ] { o . Order . Customer == null ? 0 : 1 } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -775,7 +774,7 @@ public async Task GroupByComputedValueInObjectArrayWithJoinOnIdAsync()
775774 {
776775 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
777776 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
778- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
777+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
779778 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
780779
781780 var orderGroups = await ( db . OrderLines . GroupBy ( o => new [ ] { o . Order . Customer . CustomerId == null ? 0 : 1 } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -787,7 +786,7 @@ public async Task GroupByComputedValueInObjectArrayWithJoinInRightSideOfCaseAsyn
787786 {
788787 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
789788 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
790- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
789+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
791790 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
792791
793792 var orderGroups = await ( db . OrderLines . GroupBy ( o => new [ ] { o . Order . Customer . CustomerId == null ? "unknown" : o . Order . Customer . CompanyName } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -799,7 +798,7 @@ public async Task GroupByComputedValueFromNestedArraySelectAsync()
799798 {
800799 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
801800 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
802- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
801+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
803802 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
804803
805804 var orderGroups = await ( db . OrderLines . Select ( o => new object [ ] { o } ) . GroupBy ( x => new object [ ] { ( ( OrderLine ) x [ 0 ] ) . Order . Customer == null ? 0 : 1 } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
@@ -811,7 +810,7 @@ public async Task GroupByComputedValueFromNestedObjectSelectAsync()
811810 {
812811 if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
813812 Assert . Ignore ( Dialect . GetType ( ) . Name + " does not support complex group by expressions" ) ;
814- if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
813+ if ( Sfi . ConnectionProvider . Driver . IsOdbcDriver ( ) )
815814 Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
816815
817816 var orderGroups = await ( db . OrderLines . Select ( o => new { OrderLine = ( object ) o } ) . GroupBy ( x => new object [ ] { ( ( OrderLine ) x . OrderLine ) . Order . Customer == null ? 0 : 1 } ) . Select ( g => new { Key = g . Key , Count = g . Count ( ) } ) . ToListAsync ( ) ) ;
0 commit comments