Skip to content

Commit

Permalink
Correct TrackGraph nullability (#27261)
Browse files Browse the repository at this point in the history
Fixes #27257
  • Loading branch information
roji authored Jan 25, 2022
1 parent 9e8ec9f commit d95657a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/EFCore/ChangeTracking/ChangeTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public virtual void TrackGraph(
/// <typeparam name="TState">The type of the state object.</typeparam>
public virtual void TrackGraph<TState>(
object rootEntity,
TState? state,
TState state,
Func<EntityEntryGraphNode<TState>, bool> callback)
{
Check.NotNull(rootEntity, nameof(rootEntity));
Expand Down
4 changes: 2 additions & 2 deletions src/EFCore/ChangeTracking/EntityEntryGraphNode`.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class EntityEntryGraphNode<TState> : EntityEntryGraphNode
[EntityFrameworkInternal]
public EntityEntryGraphNode(
InternalEntityEntry entry,
TState? state,
TState state,
InternalEntityEntry? sourceEntry,
INavigationBase? inboundNavigation)
: base(entry, sourceEntry, inboundNavigation)
Expand All @@ -35,7 +35,7 @@ public EntityEntryGraphNode(
/// <summary>
/// Gets or sets state that will be available to all nodes that are visited after this node.
/// </summary>
public virtual TState? NodeState { get; set; }
public virtual TState NodeState { get; set; }

/// <summary>
/// Creates a new node for the entity that is being traversed next in the graph.
Expand Down

0 comments on commit d95657a

Please sign in to comment.