File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/Microsoft.EntityFrameworkCore.Relational/Query/Internal Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public virtual void SetPrevious([NotNull] AsyncGroupJoinInclude previous)
6161 "This method is obsolete and will be removed in the 1.1.0 release. Use CreateIncludeContext instead." ,
6262 error : true ) ]
6363 public virtual void Initialize ( [ NotNull ] RelationalQueryContext queryContext )
64- => CreateIncludeContext ( queryContext ) ;
64+ => _currentContext = CreateIncludeContext ( queryContext ) ;
6565
6666 /// <summary>
6767 /// This API supports the Entity Framework Core infrastructure and is not intended to be used
@@ -81,7 +81,7 @@ var asyncGroupJoinIncludeContext
8181 asyncGroupJoinIncludeContext . SetPrevious ( _previous . CreateIncludeContext ( queryContext ) ) ;
8282 }
8383
84- return _currentContext = asyncGroupJoinIncludeContext ;
84+ return asyncGroupJoinIncludeContext ;
8585 }
8686
8787 /// <summary>
@@ -92,7 +92,7 @@ var asyncGroupJoinIncludeContext
9292 "This method is obsolete and will be removed in the 1.1.0 release. Use IncludeAsync on the object returned by CreateIncludeContext instead." ,
9393 error : true ) ]
9494 public virtual Task IncludeAsync ( [ CanBeNull ] object entity , CancellationToken cancellationToken )
95- => _currentContext . IncludeAsync ( entity , cancellationToken ) ;
95+ => _currentContext ? . IncludeAsync ( entity , cancellationToken ) ?? Task . FromResult ( 0 ) ;
9696
9797 /// <summary>
9898 /// This API supports the Entity Framework Core infrastructure and is not intended to be used
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public virtual void SetPrevious([NotNull] GroupJoinInclude previous)
6060 "This method is obsolete and will be removed in the 1.1.0 release. Use CreateIncludeContext instead." ,
6161 error : true ) ]
6262 public virtual void Initialize ( [ NotNull ] RelationalQueryContext queryContext )
63- => CreateIncludeContext ( queryContext ) ;
63+ => _currentContext = CreateIncludeContext ( queryContext ) ;
6464
6565 /// <summary>
6666 /// This API supports the Entity Framework Core infrastructure and is not intended to be used
@@ -80,7 +80,7 @@ var groupJoinIncludeContext
8080 groupJoinIncludeContext . SetPrevious ( _previous . CreateIncludeContext ( queryContext ) ) ;
8181 }
8282
83- return _currentContext = groupJoinIncludeContext ;
83+ return groupJoinIncludeContext ;
8484 }
8585
8686 /// <summary>
@@ -91,7 +91,7 @@ var groupJoinIncludeContext
9191 "This method is obsolete and will be removed in the 1.1.0 release. Use Include on the object returned by CreateIncludeContext instead." ,
9292 error : true ) ]
9393 public virtual void Include ( [ CanBeNull ] object entity )
94- => _currentContext . Include ( entity ) ;
94+ => _currentContext ? . Include ( entity ) ;
9595
9696 /// <summary>
9797 /// This API supports the Entity Framework Core infrastructure and is not intended to be used
You can’t perform that action at this time.
0 commit comments