From 113dbe6ae9f114ee8687c5a35816fac31aa4a232 Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Fri, 13 Dec 2024 16:38:26 +0800 Subject: [PATCH] Fix code null (#824) --- .../ChatStorage/AzureTable/AzureTableChatStorage.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/csharp/chatapp-withstorage/ChatStorage/AzureTable/AzureTableChatStorage.cs b/samples/csharp/chatapp-withstorage/ChatStorage/AzureTable/AzureTableChatStorage.cs index 0519b6988..2cf0f71ca 100644 --- a/samples/csharp/chatapp-withstorage/ChatStorage/AzureTable/AzureTableChatStorage.cs +++ b/samples/csharp/chatapp-withstorage/ChatStorage/AzureTable/AzureTableChatStorage.cs @@ -60,8 +60,8 @@ public async Task> GetPairsAsync(string name) var pairReadSequenceId = await _tableClient.GetEntityIfExistsAsync(pair, user, SequenceIdColumn); return new ChatHistory(user, pair, - readSequenceId.HasValue ? readSequenceId.Value.ReadToSequenceId : 0, - pairReadSequenceId.HasValue ? pairReadSequenceId.Value.ReadToSequenceId : 0, + readSequenceId.HasValue ? readSequenceId.Value!.ReadToSequenceId : 0, + pairReadSequenceId.HasValue ? pairReadSequenceId.Value!.ReadToSequenceId : 0, messages); } @@ -80,7 +80,7 @@ private async Task UpdateReadToAysncCore(string from, string to, long sequ return true; } - var entity = resp.Value; + var entity = resp.Value!; if (entity.ReadToSequenceId > sequenceId) { return false;