This commit is contained in:
Thorsten Sommer 2022-07-16 22:28:40 +02:00
parent 52b0d3af0c
commit fb2f573de4
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -37,7 +37,7 @@ public sealed class DataContext : DbContext
modelBuilder.Entity<Section>().HasIndex(n => n.Name); modelBuilder.Entity<Section>().HasIndex(n => n.Name);
modelBuilder.Entity<Section>().HasIndex(n => n.Depth); modelBuilder.Entity<Section>().HasIndex(n => n.Depth);
modelBuilder.Entity<Section>().HasIndex(n => n.DataKey); modelBuilder.Entity<Section>().HasIndex(n => n.DataKey);
// modelBuilder.Entity<Section>().Navigation(n => n.Parent).AutoInclude(); // Cyclic reference, does not work, though. // modelBuilder.Entity<Section>().Navigation(n => n.Parent).AutoInclude(); // Cycle-reference, does not work, though.
modelBuilder.Entity<Section>().Navigation(n => n.TextElements).AutoInclude(); modelBuilder.Entity<Section>().Navigation(n => n.TextElements).AutoInclude();
#endregion #endregion