Skip to content

Commit 51924bc

Browse files
committed
Revert to null to default
1 parent 332cde0 commit 51924bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

todo-list/src/McpSamples.TodoList.HybridApp/Repositories/TodoRepository.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public async Task<TodoItem> UpdateTodoItemAsync(TodoItem todoItem)
7474
.ConfigureAwait(false);
7575
if (record is null)
7676
{
77-
return null;
77+
return default!;
7878
}
7979

8080
record.Text = todoItem.Text;
@@ -95,7 +95,7 @@ public async Task<TodoItem> CompleteTodoItemAsync(TodoItem todoItem)
9595
.ConfigureAwait(false);
9696
if (record is null)
9797
{
98-
return null;
98+
return default!;
9999
}
100100

101101
record.IsCompleted = todoItem.IsCompleted;
@@ -116,7 +116,7 @@ public async Task<TodoItem> DeleteTodoItemAsync(int id)
116116
.ConfigureAwait(false);
117117
if (record is null)
118118
{
119-
return null;
119+
return default!;
120120
}
121121

122122
await db.TodoItems.Where(p => p.Id == id)

0 commit comments

Comments
 (0)