I have an entity Employee with owned entity Address
public sealed class Employee : FullAuditedEntity, IMustHaveTenant
{
...
public Address HomeAddress { get; private set; }
...
}
public class Address : ValueObject
{
public int? MunicipalityId { get; private set; }
public Municipality? Municipality { get; private set; }
[MaxLength(GeographyConsts.MaxAddressLineLength)]
public string? AddressLine { get; private set; } = string.Empty;
public int? Number { get; private set; }
...
}
public class EmployeeConfiguration : IEntityTypeConfiguration<Employee>
{
public void Configure(EntityTypeBuilder<Employee> builder)
{
builder.ToTable("Employees");
builder.OwnsOne(x => x.HomeAddress);
}
}
In EntityHistory the changes of Employee HomeAddress owned entity are correctly tracked but the EntityTypeFullName is Address
not Employee
so it's difficult to get a list of all the changes about an Employee.
Am I missing something?