Skip to content

enterprisebug/EfCoreHasDataNestedOwnedTypes

Repository files navigation

EfCoreHasDataNestedOwnedTypes

Minimal reproducible example

Problem

How to seed entities with .OwnsOne and .HasData when having nullable objects

NullableObject (working)

Scripts+

dotnet ef migrations add Initial --context NullableObjectDbContext -o Migrations/NullableObject
dotnet ef migrations remove --context NullableObjectDbContext

TwoLevelDbContext (working)

Scripts+

dotnet ef migrations add Initial --context TwoLevelDbContext -o Migrations/TwoLevel
dotnet ef migrations remove --context TwoLevelDbContext

ThreeLevelDbContext (working)

Scripts+

dotnet ef migrations add Initial --context ThreeLevelDbContext -o Migrations/ThreeLevel
dotnet ef migrations remove --context TwoLevelDbContext

SimpleNullableDbContext (working)

Scripts+

dotnet ef migrations add Initial --context SimpleNullableDbContext -o Migrations/SimpleNullable
dotnet ef migrations remove --context SimpleNullableDbContext

NullableObjectNestedNonNullable (not working)

Scripts+

dotnet ef migrations add Initial --context NullableObjectNestedNonNullableDbContext -o Migrations/NullableObjectNestedNonNullable
dotnet ef migrations remove --context NullableObjectNestedNonNullableDbContext

About

Minimal reproducible example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages