我有我的班级
public class Person
{
public string Id {get; set;}
public string Name {get;set;}
public int Age {get;set;}
public virtual Patient {get;set;}
public virtual User {get;set;}
}
public class Patient
{
public string PersonId { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string City { get; set; }
public int Zipcode { get; set; }
public string State { get; set; }
public string Country { get; set; }
public virtual Person Person { get; set; }
}
public class User : IdentityUser
{
}
我想在Patient.cs
和User.cs
Person.cs
对于我使用的Patient
课程FluentApi
modelBuilder.Entity<Person>().HasOptional(p => p.Patient).WithRequired(p => p.Person);
对于我的用户班,我该怎么做?