A part of my Model looks like this:
public class Person
{
public virtual Guid Id { get; set; }
public s开发者_Python百科tring Name { get; set; }
}
public class Employee : Person
{
public virtual int EmployeeNumber { get; set; }
public virtual Person Partner { get; set; }
}
The generated sql for this is:
create table [Person] (
Id UNIQUEIDENTIFIER not null,
Name NVARCHAR(255) null,
Employee_id UNIQUEIDENTIFIER null,
primary key (Id)
)
create table Employee (
Person_id UNIQUEIDENTIFIER not null,
EmployeeNumber INT null,
Partner_Id UNIQUEIDENTIFIER null,
primary key (Person_id)
)
Why is there a Employee_id UNIQUEIDENTIFIER null,
inside the Person table?
精彩评论