@@ -261,7 +261,7 @@ public async Task SimpleInsertWithConstantsAsync()
261261 var count = await ( s
262262 . Query < Car > ( )
263263 . InsertBuilder ( ) . Into < Pickup > ( ) . Value ( y => y . Id , y => - y . Id ) . Value ( y => y . Vin , y => y . Vin ) . Value ( y => y . Owner , "The owner" )
264- . InsertAsync ( CancellationToken . None ) ) ;
264+ . InsertAsync ( ) ) ;
265265 Assert . AreEqual ( 1 , count ) ;
266266
267267 await ( t . CommitAsync ( ) ) ;
@@ -278,7 +278,7 @@ public async Task SimpleInsertFromProjectionAsync()
278278 . Query < Car > ( )
279279 . Select ( x => new { x . Id , x . Owner , UpperOwner = x . Owner . ToUpper ( ) } )
280280 . InsertBuilder ( ) . Into < Pickup > ( ) . Value ( y => y . Id , y => - y . Id ) . Value ( y => y . Vin , y => y . UpperOwner )
281- . InsertAsync ( CancellationToken . None ) ) ;
281+ . InsertAsync ( ) ) ;
282282 Assert . AreEqual ( 1 , count ) ;
283283
284284 await ( t . CommitAsync ( ) ) ;
@@ -497,7 +497,7 @@ public async Task InsertToComponentAsync()
497497 // https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-dml-insert.html#fblangref25-dml-insert-select-unstable
498498 . Where ( sc => sc . Name . First != correctName )
499499 . InsertBuilder ( ) . Into < SimpleClassWithComponent > ( ) . Value ( y => y . Name . First , y => correctName )
500- . InsertAsync ( CancellationToken . None ) ) ;
500+ . InsertAsync ( ) ) ;
501501 Assert . That ( count , Is . EqualTo ( 1 ) , "incorrect insert count from individual setters" ) ;
502502
503503 count = s
@@ -552,7 +552,7 @@ public async Task UpdateWithWhereExistsSubqueryAsync()
552552 . Query < Human > ( )
553553 . Where ( x => x . Friends . OfType < Human > ( ) . Any ( f => f . Name . Last == "Public" ) )
554554 . UpdateBuilder ( ) . Set ( y => y . Description , "updated" )
555- . UpdateAsync ( CancellationToken . None ) ) ;
555+ . UpdateAsync ( ) ) ;
556556 Assert . That ( count , Is . EqualTo ( 1 ) ) ;
557557 await ( t . CommitAsync ( ) ) ;
558558 }
@@ -566,7 +566,7 @@ public async Task UpdateWithWhereExistsSubqueryAsync()
566566 . Query < SimpleEntityWithAssociation > ( )
567567 . Where ( x => x . AssociatedEntities . Any ( a => a . Name == "one-to-many-association" ) )
568568 . UpdateBuilder ( ) . Set ( y => y . Name , "updated" )
569- . UpdateAsync ( CancellationToken . None ) ) ;
569+ . UpdateAsync ( ) ) ;
570570 Assert . That ( count , Is . EqualTo ( 1 ) ) ;
571571 // many-to-many test
572572 if ( Dialect . SupportsSubqueryOnMutatingTable )
@@ -575,7 +575,7 @@ public async Task UpdateWithWhereExistsSubqueryAsync()
575575 . Query < SimpleEntityWithAssociation > ( )
576576 . Where ( x => x . ManyToManyAssociatedEntities . Any ( a => a . Name == "many-to-many-association" ) )
577577 . UpdateBuilder ( ) . Set ( y => y . Name , "updated" )
578- . UpdateAsync ( CancellationToken . None ) ) ;
578+ . UpdateAsync ( ) ) ;
579579
580580 Assert . That ( count , Is . EqualTo ( 1 ) ) ;
581581 }
@@ -596,7 +596,7 @@ public async Task IncrementCounterVersionAsync()
596596 var count = await ( s
597597 . Query < IntegerVersioned > ( )
598598 . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name + "upd" ) . Set ( y => y . Data , y => y . Data + "upd" )
599- . UpdateVersionedAsync ( CancellationToken . None ) ) ;
599+ . UpdateVersionedAsync ( ) ) ;
600600 Assert . That ( count , Is . EqualTo ( 1 ) , "incorrect exec count" ) ;
601601 await ( t . CommitAsync ( ) ) ;
602602 }
@@ -627,7 +627,7 @@ public async Task IncrementTimestampVersionAsync()
627627 var count = await ( s
628628 . Query < TimestampVersioned > ( )
629629 . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name + "upd" ) . Set ( y => y . Data , y => y . Data + "upd" )
630- . UpdateVersionedAsync ( CancellationToken . None ) ) ;
630+ . UpdateVersionedAsync ( ) ) ;
631631 Assert . That ( count , Is . EqualTo ( 1 ) , "incorrect exec count" ) ;
632632 await ( t . CommitAsync ( ) ) ;
633633 }
@@ -700,12 +700,12 @@ public async Task UpdateOnManyToOneAsync()
700700 using ( var s = OpenSession ( ) )
701701 using ( var t = s . BeginTransaction ( ) )
702702 {
703- Assert . DoesNotThrowAsync ( ( ) => { return s . Query < Animal > ( ) . Where ( x => x . Id == 2 ) . UpdateBuilder ( ) . Set ( y => y . Mother , y => null ) . UpdateAsync ( CancellationToken . None ) ; } ) ;
703+ Assert . DoesNotThrowAsync ( ( ) => { return s . Query < Animal > ( ) . Where ( x => x . Id == 2 ) . UpdateBuilder ( ) . Set ( y => y . Mother , y => null ) . UpdateAsync ( ) ; } ) ;
704704
705705 if ( Dialect . SupportsSubqueryOnMutatingTable )
706706 {
707707 Assert . DoesNotThrowAsync (
708- ( ) => { return s . Query < Animal > ( ) . Where ( x => x . Id == 2 ) . UpdateBuilder ( ) . Set ( y => y . Mother , y => s . Query < Animal > ( ) . First ( z => z . Id == 1 ) ) . UpdateAsync ( CancellationToken . None ) ; } ) ;
708+ ( ) => { return s . Query < Animal > ( ) . Where ( x => x . Id == 2 ) . UpdateBuilder ( ) . Set ( y => y . Mother , y => s . Query < Animal > ( ) . First ( z => z . Id == 1 ) ) . UpdateAsync ( ) ; } ) ;
709709 }
710710
711711 await ( t . CommitAsync ( ) ) ;
@@ -719,22 +719,22 @@ public async Task UpdateOnDiscriminatorSubclassAsync()
719719 {
720720 using ( var t = s . BeginTransaction ( ) )
721721 {
722- var count = await ( s . Query < PettingZoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( CancellationToken . None ) ) ;
722+ var count = await ( s . Query < PettingZoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( ) ) ;
723723 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect discrim subclass update count" ) ;
724724
725725 await ( t . RollbackAsync ( ) ) ;
726726 }
727727 using ( var t = s . BeginTransaction ( ) )
728728 {
729- var count = await ( s . Query < PettingZoo > ( ) . Where ( x => x . Id == _pettingZoo . Id ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( CancellationToken . None ) ) ;
729+ var count = await ( s . Query < PettingZoo > ( ) . Where ( x => x . Id == _pettingZoo . Id ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( ) ) ;
730730 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect discrim subclass update count" ) ;
731731
732732 await ( t . RollbackAsync ( ) ) ;
733733 }
734734 using ( var t = s . BeginTransaction ( ) )
735735 {
736736
737- var count = await ( s . Query < Zoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( CancellationToken . None ) ) ;
737+ var count = await ( s . Query < Zoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( ) ) ;
738738 Assert . That ( count , Is . EqualTo ( 2 ) , "Incorrect discrim subclass update count" ) ;
739739
740740 await ( t . RollbackAsync ( ) ) ;
@@ -743,7 +743,7 @@ public async Task UpdateOnDiscriminatorSubclassAsync()
743743 {
744744 // TODO : not so sure this should be allowed. Seems to me that if they specify an alias,
745745 // property-refs should be required to be qualified.
746- var count = await ( s . Query < Zoo > ( ) . Where ( x => x . Id == _zoo . Id ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( CancellationToken . None ) ) ;
746+ var count = await ( s . Query < Zoo > ( ) . Where ( x => x . Id == _zoo . Id ) . UpdateBuilder ( ) . Set ( y => y . Name , y => y . Name ) . UpdateAsync ( ) ) ;
747747 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect discrim subclass update count" ) ;
748748
749749 await ( t . CommitAsync ( ) ) ;
@@ -766,25 +766,25 @@ public async Task UpdateOnAnimalAsync()
766766 //Assert.That(count, Is.EqualTo(1), "Incorrect entity-updated count");
767767
768768 var count =
769- await ( s . Query < Animal > ( ) . Where ( x => x . Description == _polliwog . Description ) . UpdateBuilder ( ) . Set ( y => y . Description , y => "Tadpole" ) . UpdateAsync ( CancellationToken . None ) ) ;
769+ await ( s . Query < Animal > ( ) . Where ( x => x . Description == _polliwog . Description ) . UpdateBuilder ( ) . Set ( y => y . Description , y => "Tadpole" ) . UpdateAsync ( ) ) ;
770770 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect entity-updated count" ) ;
771771
772772 var tadpole = await ( s . LoadAsync < Animal > ( _polliwog . Id ) ) ;
773773
774774 Assert . That ( tadpole . Description , Is . EqualTo ( "Tadpole" ) , "Update did not take effect" ) ;
775775
776776 count =
777- await ( s . Query < Dragon > ( ) . UpdateBuilder ( ) . Set ( y => y . FireTemperature , 300 ) . UpdateAsync ( CancellationToken . None ) ) ;
777+ await ( s . Query < Dragon > ( ) . UpdateBuilder ( ) . Set ( y => y . FireTemperature , 300 ) . UpdateAsync ( ) ) ;
778778 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect entity-updated count" ) ;
779779
780780
781781 count =
782- await ( s . Query < Animal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , y => y . BodyWeight + 1 + 1 ) . UpdateAsync ( CancellationToken . None ) ) ;
782+ await ( s . Query < Animal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , y => y . BodyWeight + 1 + 1 ) . UpdateAsync ( ) ) ;
783783 Assert . That ( count , Is . EqualTo ( 10 ) , "incorrect count on 'complex' update assignment" ) ;
784784
785785 if ( Dialect . SupportsSubqueryOnMutatingTable )
786786 {
787- Assert . DoesNotThrowAsync ( ( ) => { return s . Query < Animal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , y => s . Query < Animal > ( ) . Max ( z => z . BodyWeight ) ) . UpdateAsync ( CancellationToken . None ) ; } ) ;
787+ Assert . DoesNotThrowAsync ( ( ) => { return s . Query < Animal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , y => s . Query < Animal > ( ) . Max ( z => z . BodyWeight ) ) . UpdateAsync ( ) ; } ) ;
788788 }
789789
790790 await ( t . CommitAsync ( ) ) ;
@@ -803,7 +803,7 @@ public async Task UpdateOnDragonWithProtectedPropertyAsync()
803803 using ( var t = s . BeginTransaction ( ) )
804804 {
805805 var count =
806- await ( s . Query < Dragon > ( ) . UpdateBuilder ( ) . Set ( y => y . FireTemperature , 300 ) . UpdateAsync ( CancellationToken . None ) ) ;
806+ await ( s . Query < Dragon > ( ) . UpdateBuilder ( ) . Set ( y => y . FireTemperature , 300 ) . UpdateAsync ( ) ) ;
807807 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect entity-updated count" ) ;
808808
809809 await ( t . CommitAsync ( ) ) ;
@@ -824,7 +824,7 @@ public async Task UpdateMultiplePropertyOnAnimalAsync()
824824 var count =
825825 await ( s . Query < Animal > ( )
826826 . Where ( x => x . Description == _polliwog . Description )
827- . UpdateBuilder ( ) . Set ( y => y . Description , y => "Tadpole" ) . Set ( y => y . BodyWeight , 3 ) . UpdateAsync ( CancellationToken . None ) ) ;
827+ . UpdateBuilder ( ) . Set ( y => y . Description , y => "Tadpole" ) . Set ( y => y . BodyWeight , 3 ) . UpdateAsync ( ) ) ;
828828
829829 Assert . That ( count , Is . EqualTo ( 1 ) ) ;
830830 await ( t . CommitAsync ( ) ) ;
@@ -850,16 +850,16 @@ public async Task UpdateOnMammalAsync()
850850 using ( var s = OpenSession ( ) )
851851 using ( var t = s . BeginTransaction ( ) )
852852 {
853- var count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . Description , y => y . Description ) . UpdateAsync ( CancellationToken . None ) ) ;
853+ var count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . Description , y => y . Description ) . UpdateAsync ( ) ) ;
854854
855855 Assert . That ( count , Is . EqualTo ( 5 ) , "incorrect update count against 'middle' of joined-subclass hierarchy" ) ;
856856
857- count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , 25 ) . UpdateAsync ( CancellationToken . None ) ) ;
857+ count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , 25 ) . UpdateAsync ( ) ) ;
858858 Assert . That ( count , Is . EqualTo ( 5 ) , "incorrect update count against 'middle' of joined-subclass hierarchy" ) ;
859859
860860 if ( Dialect . SupportsSubqueryOnMutatingTable )
861861 {
862- count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , y => s . Query < Animal > ( ) . Max ( z => z . BodyWeight ) ) . UpdateAsync ( CancellationToken . None ) ) ;
862+ count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , y => s . Query < Animal > ( ) . Max ( z => z . BodyWeight ) ) . UpdateAsync ( ) ) ;
863863 Assert . That ( count , Is . EqualTo ( 5 ) , "incorrect update count against 'middle' of joined-subclass hierarchy" ) ;
864864 }
865865
@@ -879,9 +879,9 @@ public async Task UpdateSetNullUnionSubclassAsync()
879879 using ( var s = OpenSession ( ) )
880880 using ( var t = s . BeginTransaction ( ) )
881881 {
882- var count = await ( s . Query < Vehicle > ( ) . UpdateBuilder ( ) . Set ( y => y . Owner , "Steve" ) . UpdateAsync ( CancellationToken . None ) ) ;
882+ var count = await ( s . Query < Vehicle > ( ) . UpdateBuilder ( ) . Set ( y => y . Owner , "Steve" ) . UpdateAsync ( ) ) ;
883883 Assert . That ( count , Is . EqualTo ( 4 ) , "incorrect restricted update count" ) ;
884- count = await ( s . Query < Vehicle > ( ) . Where ( x => x . Owner == "Steve" ) . UpdateBuilder ( ) . Set ( y => y . Owner , default ( string ) ) . UpdateAsync ( CancellationToken . None ) ) ;
884+ count = await ( s . Query < Vehicle > ( ) . Where ( x => x . Owner == "Steve" ) . UpdateBuilder ( ) . Set ( y => y . Owner , default ( string ) ) . UpdateAsync ( ) ) ;
885885 Assert . That ( count , Is . EqualTo ( 4 ) , "incorrect restricted update count" ) ;
886886
887887 count = await ( s . CreateQuery ( "delete Vehicle where Owner is null" ) . ExecuteUpdateAsync ( ) ) ;
@@ -897,13 +897,13 @@ public async Task UpdateSetNullOnDiscriminatorSubclassAsync()
897897 using ( var s = OpenSession ( ) )
898898 using ( var t = s . BeginTransaction ( ) )
899899 {
900- var count = await ( s . Query < PettingZoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Address . City , default ( string ) ) . UpdateAsync ( CancellationToken . None ) ) ;
900+ var count = await ( s . Query < PettingZoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Address . City , default ( string ) ) . UpdateAsync ( ) ) ;
901901
902902 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect discrim subclass delete count" ) ;
903903 count = await ( s . CreateQuery ( "delete Zoo where Address.City is null" ) . ExecuteUpdateAsync ( ) ) ;
904904 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect discrim subclass delete count" ) ;
905905
906- count = await ( s . Query < Zoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Address . City , default ( string ) ) . UpdateAsync ( CancellationToken . None ) ) ;
906+ count = await ( s . Query < Zoo > ( ) . UpdateBuilder ( ) . Set ( y => y . Address . City , default ( string ) ) . UpdateAsync ( ) ) ;
907907 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect discrim subclass delete count" ) ;
908908 count = await ( s . CreateQuery ( "delete Zoo where Address.City is null" ) . ExecuteUpdateAsync ( ) ) ;
909909 Assert . That ( count , Is . EqualTo ( 1 ) , "Incorrect discrim subclass delete count" ) ;
@@ -923,7 +923,7 @@ public async Task UpdateSetNullOnJoinedSubclassAsync()
923923 using ( var s = OpenSession ( ) )
924924 using ( var t = s . BeginTransaction ( ) )
925925 {
926- var count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , - 1 ) . UpdateAsync ( CancellationToken . None ) ) ;
926+ var count = await ( s . Query < Mammal > ( ) . UpdateBuilder ( ) . Set ( y => y . BodyWeight , - 1 ) . UpdateAsync ( ) ) ;
927927 Assert . That ( count , Is . EqualTo ( 5 ) , "Incorrect update count on joined subclass" ) ;
928928
929929 count = await ( s . Query < Mammal > ( ) . CountAsync ( m => m . BodyWeight > - 1.0001 && m . BodyWeight < - 0.9999 ) ) ;
0 commit comments