Created
September 6, 2019 10:15
-
-
Save Nihlus/e40f9419fbcda14643fba296e434e6fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modelBuilder.Entity<AppearanceConfiguration>() | |
.OwnsOne(ac => ac.DefaultAppearance, dao => | |
{ | |
dao.ToTable("Appearances", SchemaName); | |
dao.OwnsMany(a => a.Components, ao => | |
{ | |
ao.ToTable("AppearanceComponents", SchemaName); | |
ao.OwnsOne(c => c.BaseColour, od => od.ToTable("BaseColours", SchemaName)); | |
ao.OwnsOne(c => c.PatternColour, od => od.ToTable("PatternColours", SchemaName)); | |
ao.Property<long>("ID"); | |
ao.HasKey("ID"); | |
}); | |
dao.HasForeignKey("AppearanceConfigurationID"); | |
dao.Property<long>("ID"); | |
dao.HasKey("AppearanceConfigurationID", "ID"); | |
}) | |
.OwnsOne(ac => ac.CurrentAppearance, cao => | |
{ | |
cao.ToTable("Appearances", SchemaName); | |
cao.OwnsMany(a => a.Components, ao => | |
{ | |
ao.ToTable("AppearanceComponents", SchemaName); | |
ao.OwnsOne(c => c.BaseColour, od => od.ToTable("BaseColours", SchemaName)); | |
ao.OwnsOne(c => c.PatternColour, od => od.ToTable("PatternColours", SchemaName)); | |
ao.Property<long>("ID"); | |
ao.HasKey("ID"); | |
}); | |
cao.HasForeignKey("AppearanceConfigurationID"); | |
cao.Property<long>("ID"); | |
cao.HasKey("AppearanceConfigurationID", "ID"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment