I have the folowing classes
public class Parent
{
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<Child> Children{ get; set; }
}
public class Child
{
public int Id { get; set; }
public string Name { get; set; }
public int ParentId { get; set; }
public virtual Parent Parent { get; set; }
}
I’m looking to store this data in a flat / single database table with the folowing structure
ParentId – ParentName – ChildId – ChildName
I tried numerous combinations of fluent configurations but haven’t been able to generate a table this way.
Note that i’m using EF Core 3.1, so ComplexType are not supported yet on this version.