These messages are warnings instead of errors, Your code and work well with these warnings. Here is the explanation from Microsoft Document:
- CS8602 - Dereference of a possibly null reference.
- CS8620 - Argument cannot be used for parameter due to differences in the nullability of reference types.
From descriptions you can see it is all about nullable in asp.net core, You can also refer to this Docs to learn more about Working with Nullable Reference Types.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Xinran Shen