Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct nullability of DbSet.Find #25125

Merged
1 commit merged into from
Jun 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/EFCore/DbSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public virtual LocalView<TEntity> Local
/// </summary>
/// <param name="keyValues">The values of the primary key for the entity to be found.</param>
/// <returns>The entity found, or <see langword="null" />.</returns>
public virtual TEntity? Find(params object[]? keyValues)
public virtual TEntity? Find(params object?[]? keyValues)
=> throw new NotSupportedException();

/// <summary>
Expand All @@ -112,7 +112,7 @@ public virtual LocalView<TEntity> Local
/// </summary>
/// <param name="keyValues">The values of the primary key for the entity to be found.</param>
/// <returns>The entity found, or <see langword="null" />.</returns>
public virtual ValueTask<TEntity?> FindAsync(params object[]? keyValues)
public virtual ValueTask<TEntity?> FindAsync(params object?[]? keyValues)
=> throw new NotSupportedException();

/// <summary>
Expand All @@ -126,7 +126,7 @@ public virtual LocalView<TEntity> Local
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for the task to complete.</param>
/// <returns>The entity found, or <see langword="null" />.</returns>
/// <exception cref="OperationCanceledException"> If the <see cref="CancellationToken"/> is canceled. </exception>
public virtual ValueTask<TEntity?> FindAsync(object[]? keyValues, CancellationToken cancellationToken)
public virtual ValueTask<TEntity?> FindAsync(object?[]? keyValues, CancellationToken cancellationToken)
=> throw new NotSupportedException();

/// <summary>
Expand Down