15
15
using System . Text . RegularExpressions ;
16
16
using NHibernate . Dialect ;
17
17
using NHibernate . DomainModel . Northwind . Entities ;
18
- using NHibernate . Driver ;
19
18
using NHibernate . Linq ;
20
19
using NUnit . Framework ;
21
20
@@ -562,7 +561,7 @@ public async Task GroupByComputedValueAsync()
562
561
{
563
562
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
564
563
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 ( ) )
566
565
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
567
566
568
567
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()
574
573
{
575
574
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
576
575
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 ( ) )
578
577
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
579
578
580
579
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()
586
585
{
587
586
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
588
587
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 ( ) )
590
589
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
591
590
592
591
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()
715
714
{
716
715
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
717
716
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 ( ) )
719
718
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
720
719
721
720
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()
727
726
{
728
727
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
729
728
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 ( ) )
731
730
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
732
731
733
732
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()
739
738
{
740
739
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
741
740
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 ( ) )
743
742
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
744
743
745
744
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()
751
750
{
752
751
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
753
752
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 ( ) )
755
754
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
756
755
757
756
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()
763
762
{
764
763
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
765
764
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 ( ) )
767
766
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
768
767
769
768
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()
775
774
{
776
775
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
777
776
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 ( ) )
779
778
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
780
779
781
780
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
787
786
{
788
787
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
789
788
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 ( ) )
791
790
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
792
791
793
792
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()
799
798
{
800
799
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
801
800
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 ( ) )
803
802
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
804
803
805
804
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()
811
810
{
812
811
if ( ! TestDialect . SupportsComplexExpressionInGroupBy )
813
812
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 ( ) )
815
814
Assert . Ignore ( "SQL Server seems unable to match complex group by and select list arguments when running over ODBC." ) ;
816
815
817
816
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