Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/EFCore.Cosmos/Storage/Internal/ByteArrayConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public override void WriteJson(
public override object ReadJson(
JsonReader reader,
Type objectType,
object existingValue,
object? existingValue,
JsonSerializer serializer)
{
if (reader.TokenType != JsonToken.StartArray)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ private static async Task<bool> CreateItemOnceAsync(
response.Diagnostics.GetClientElapsedTime(),
response.Headers.RequestCharge,
response.Headers.ActivityId,
parameters.Document["id"].ToString(),
parameters.Document["id"]!.ToString(),
parameters.ContainerId,
partitionKeyValue);

Expand Down
4 changes: 2 additions & 2 deletions src/EFCore.Cosmos/Storage/Internal/CosmosDatabaseWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private bool Save(IUpdateEntry entry)
if (propertyName != null)
{
document[propertyName] =
JToken.FromObject(entityType.GetDiscriminatorValue(), CosmosClientWrapper.Serializer);
JToken.FromObject(entityType.GetDiscriminatorValue()!, CosmosClientWrapper.Serializer);
}
}

Expand Down Expand Up @@ -377,7 +377,7 @@ private Task<bool> SaveAsync(IUpdateEntry entry, CancellationToken cancellationT
if (propertyName != null)
{
document[propertyName] =
JToken.FromObject(entityType.GetDiscriminatorValue(), CosmosClientWrapper.Serializer);
JToken.FromObject(entityType.GetDiscriminatorValue()!, CosmosClientWrapper.Serializer);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public override T FromStream<T>(Stream stream)

using var streamReader = new StreamReader(stream);
using var jsonTextReader = new JsonTextReader(streamReader);
return GetSerializer().Deserialize<T>(jsonTextReader);
return GetSerializer().Deserialize<T>(jsonTextReader)!;
}
}

Expand Down