1.设置模型,引入构造函数,初始化集合 public class Person { public Person() //引入构造函数,初始化集合.如果未设置构造函数,集合会出现错误. { Skills = new HashSet<string>(); BirthDate = DateTime.Now.AddDays(-20); } public int PersonId { get; set; } [Required] public string FirstName { get; set; }…