Entity configuration for multiple nested value objects in temporal table
09:44 05 Feb 2026

I'd like to create a table in my SQLServer. My entity in the code contains a multiple nested value object.

My "Student" table is a temporal table. All properties and subproperties of the class Student should be in the same table.

The entity:

public class Student
{
    public int Id { get; set; }
    public string Name { get; set; }
    public StudentDetails Details { get; set; }
}

public class StudentDetails
{
    public Address Address { get; set; }
    public string Comment { get; set; }
}

public class Address
{
    public Street Street { get; set; }
    public string City { get; set; }
}

public class Street
{
    public string Name { get; set; }
}

The table should contain the following columns:

  • Id

  • Name

  • Details_Address_Street_Name

  • Details_Address_City

  • Details_Comment

  • PeriodStart

  • PeriodEnd

How must the entity configuration be done? In different implementations I get errors when creating the migration or when writing data to the db.

It says the primary key is missing or the PeriodStart and PeriodEnd must be the same column of all properties, ...

I'm happy about all hints

c# sql-server entity-framework temporal-tables