C# 尝试运行Microsoft示例程序ContactManager时出错

C# 尝试运行Microsoft示例程序ContactManager时出错,c#,entity-framework,asp.net-core,authorization,asp.net-core-2.1,C#,Entity Framework,Asp.net Core,Authorization,Asp.net Core 2.1,当我尝试运行asp.net core 2.1的联系人管理器程序时,当该程序尝试为数据库设定种子时,会出现ArgumentNullException错误 System.AggregateException HResult=0x80131500 Message=One or more errors occurred. Source=ContactManager StackTrace: at ContactManager.Program.Main(String[] args) i

当我尝试运行asp.net core 2.1的联系人管理器程序时,当该程序尝试为数据库设定种子时,会出现ArgumentNullException错误

System.AggregateException
  HResult=0x80131500
  Message=One or more errors occurred.
  Source=ContactManager
  StackTrace:
   at ContactManager.Program.Main(String[] args) in C:\Users\EphraimF\source\repos\CMfinal\Program.cs:line 41

Inner Exception 1:
ArgumentNullException: Value cannot be null.

The error in generated because a null is returned by `userManager.FindByIdAsync(uid)`.

repo是asp.net core 2.1文档的一部分,可在此处找到:

A
ArgumentNullException
表示您的uid为空,而不是由
FindByIdAsync
返回的uid可能重复