diff --git a/test/EFCore.Analyzers.Tests/TestUtilities/DiagnosticAnalyzerTestBase.cs b/test/EFCore.Analyzers.Tests/TestUtilities/DiagnosticAnalyzerTestBase.cs index 5f33a445660..4c42e3e2ea1 100644 --- a/test/EFCore.Analyzers.Tests/TestUtilities/DiagnosticAnalyzerTestBase.cs +++ b/test/EFCore.Analyzers.Tests/TestUtilities/DiagnosticAnalyzerTestBase.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.DependencyModel; -using CompilationOptions = Microsoft.CodeAnalysis.CompilationOptions; namespace Microsoft.EntityFrameworkCore.TestUtilities; @@ -27,7 +26,9 @@ protected async Task AssertNoDiagnostics(string source, params string[] extraUsi => GetDiagnosticsAsync(source, analyzerDiagnosticsOnly: true, extraUsings); protected virtual async Task<(Diagnostic[], string)> GetDiagnosticsAsync( - string source, bool analyzerDiagnosticsOnly, params string[] extraUsings) + string source, + bool analyzerDiagnosticsOnly, + params string[] extraUsings) { var sb = new StringBuilder(); foreach (var @using in _usings.Concat(extraUsings)) @@ -60,9 +61,10 @@ protected async Task GetDiagnosticsFullSourceAsync(string source, var analyzer = CreateDiagnosticAnalyzer(); var compilationWithAnalyzers = compilation - .WithAnalyzers(ImmutableArray.Create(analyzer), + .WithAnalyzers( + ImmutableArray.Create(analyzer), new CompilationWithAnalyzersOptions( - new AnalyzerOptions(new()), + new AnalyzerOptions(new ImmutableArray()), onAnalyzerException: null, concurrentAnalysis: false, logAnalyzerExecutionTime: false, @@ -102,10 +104,7 @@ var metadataReferences .WithCompilationOptions( new CSharpCompilationOptions( OutputKind.DynamicallyLinkedLibrary, - specificDiagnosticOptions: new Dictionary - { - { "CS1701", ReportDiagnostic.Suppress } - }, + specificDiagnosticOptions: new Dictionary { { "CS1701", ReportDiagnostic.Suppress } }, nullableContextOptions: NullableContextOptions.Enable)); } } diff --git a/test/EFCore.AspNet.Specification.Tests/ConfigurationDbContextTestBase.cs b/test/EFCore.AspNet.Specification.Tests/ConfigurationDbContextTestBase.cs index 0cb80307c43..31eb456fe37 100644 --- a/test/EFCore.AspNet.Specification.Tests/ConfigurationDbContextTestBase.cs +++ b/test/EFCore.AspNet.Specification.Tests/ConfigurationDbContextTestBase.cs @@ -18,7 +18,9 @@ protected ConfigurationDbContextTestBase(ConfigurationDbContextFixtureBase fixtu protected ConfigurationDbContextFixtureBase Fixture { get; } - [ConditionalFact(Skip = "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] + [ConditionalFact( + Skip = + "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] public async Task Can_call_ResourceStore_FindApiScopesByNameAsync() => await ExecuteWithStrategyInTransactionAsync( async context => @@ -70,7 +72,9 @@ private static async Task SaveApiScopes(ConfigurationDbContext context) await context.SaveChangesAsync(); } - [ConditionalFact(Skip = "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] + [ConditionalFact( + Skip = + "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] public async Task Can_call_ClientStore_FindClientByIdAsync() => await ExecuteWithStrategyInTransactionAsync( async context => @@ -99,7 +103,9 @@ public async Task Can_call_ClientStore_FindClientByIdAsync() } ); - [ConditionalFact(Skip = "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] + [ConditionalFact( + Skip = + "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] public async Task Can_call_ResourceStore_FindIdentityResourcesByScopeNameAsync() => await ExecuteWithStrategyInTransactionAsync( async context => @@ -115,7 +121,9 @@ public async Task Can_call_ResourceStore_FindIdentityResourcesByScopeNameAsync() } ); - [ConditionalFact(Skip = "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] + [ConditionalFact( + Skip = + "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] public async Task Can_call_ResourceStore_FindApiResourcesByScopeNameAsync() => await ExecuteWithStrategyInTransactionAsync( async context => @@ -130,7 +138,9 @@ public async Task Can_call_ResourceStore_FindApiResourcesByScopeNameAsync() } ); - [ConditionalFact(Skip = "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] + [ConditionalFact( + Skip = + "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] public async Task Can_call_ResourceStore_GetAllResourcesAsync() => await ExecuteWithStrategyInTransactionAsync( async context => @@ -209,7 +219,9 @@ private static async Task SaveApiResources(ConfigurationDbContext context) await context.SaveChangesAsync(); } - [ConditionalFact(Skip = "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] + [ConditionalFact( + Skip = + "VerificationException : Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.")] public async Task Can_call_ResourceStore_FindApiResourcesByNameAsync() => await ExecuteWithStrategyInTransactionAsync( async context => diff --git a/test/EFCore.AspNet.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs b/test/EFCore.AspNet.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs index 1cca398428b..660729c7ab1 100644 --- a/test/EFCore.AspNet.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs +++ b/test/EFCore.AspNet.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // Skip the entire assembly if not on Windows and no external SQL Server is configured + [assembly: SqlServerConfiguredCondition] diff --git a/test/EFCore.Cosmos.FunctionalTests/ConfigPatternsCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/ConfigPatternsCosmosTest.cs index e3e2c4518d8..955a6bad082 100644 --- a/test/EFCore.Cosmos.FunctionalTests/ConfigPatternsCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/ConfigPatternsCosmosTest.cs @@ -83,7 +83,9 @@ public async Task Should_throw_if_specified_region_is_wrong() context.SaveChanges(); }); - Assert.Equal("ApplicationRegion configuration 'FakeRegion' is not a valid Azure region or the current SDK version does not recognize it. If the value represents a valid region, make sure you are using the latest SDK version.", exception.Message); + Assert.Equal( + "ApplicationRegion configuration 'FakeRegion' is not a valid Azure region or the current SDK version does not recognize it. If the value represents a valid region, make sure you are using the latest SDK version.", + exception.Message); } [ConditionalFact] diff --git a/test/EFCore.Cosmos.FunctionalTests/Properties/TestAssemblyCondition.cs b/test/EFCore.Cosmos.FunctionalTests/Properties/TestAssemblyCondition.cs index caac8d85e34..4bfe2bfbbc3 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Properties/TestAssemblyCondition.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Properties/TestAssemblyCondition.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // Skip the entire assembly if cannot connect to CosmosDb + [assembly: CosmosDbConfiguredCondition] // Waiting on Task causes deadlocks when run in parallel diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs index 42a90493ebd..5a634670ce5 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs @@ -26,8 +26,7 @@ protected NorthwindContext CreateContext() public async Task FromSqlRaw_queryable_simple(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""ContactName""] LIKE '%z%'"); var actual = async @@ -49,9 +48,7 @@ public async Task FromSqlRaw_queryable_simple(bool async) public async Task FromSqlRaw_queryable_incorrect_discriminator_throws(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Order"""); + var query = context.Set().FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Order"""); var exception = async ? await Assert.ThrowsAsync(() => query.ToArrayAsync()) @@ -67,8 +64,7 @@ public async Task FromSqlRaw_queryable_incorrect_discriminator_throws(bool async public async Task FromSqlRaw_queryable_simple_columns_out_of_order(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT c[""id""], c[""Discriminator""], c[""Region""], c[""PostalCode""], c[""Phone""], c[""Fax""], c[""CustomerID""], c[""Country""], c[""ContactTitle""], c[""ContactName""], c[""CompanyName""], c[""City""], c[""Address""] FROM root c WHERE c[""Discriminator""] = ""Customer"""); var actual = async @@ -90,8 +86,7 @@ public async Task FromSqlRaw_queryable_simple_columns_out_of_order(bool async) public async Task FromSqlRaw_queryable_simple_columns_out_of_order_and_extra_columns(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT c[""id""], c[""Discriminator""], c[""Region""], c[""PostalCode""], c[""PostalCode""] AS Foo, c[""Phone""], c[""Fax""], c[""CustomerID""], c[""Country""], c[""ContactTitle""], c[""ContactName""], c[""CompanyName""], c[""City""], c[""Address""] FROM root c WHERE c[""Discriminator""] = ""Customer"""); var actual = async @@ -113,9 +108,8 @@ public async Task FromSqlRaw_queryable_simple_columns_out_of_order_and_extra_col public async Task FromSqlRaw_queryable_composed(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""").Where(c => c.ContactName.Contains("z")); + var query = context.Set().FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") + .Where(c => c.ContactName.Contains("z")); var sql = query.ToQueryString(); @@ -139,8 +133,7 @@ public async Task FromSqlRaw_queryable_composed(bool async) public virtual async Task FromSqlRaw_queryable_composed_after_removing_whitespaces(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( _eol + " " + _eol + _eol + _eol + "SELECT" + _eol + @"* FROM root c WHERE c[""Discriminator""] = ""Customer""") .Where(c => c.ContactName.Contains("z")); @@ -171,9 +164,8 @@ public async Task FromSqlRaw_queryable_composed_compiled(bool async) if (async) { var query = EF.CompileAsyncQuery( - (NorthwindContext context) => CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") + (NorthwindContext context) => context.Set() + .FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") .Where(c => c.ContactName.Contains("z"))); using (var context = CreateContext()) @@ -186,9 +178,8 @@ public async Task FromSqlRaw_queryable_composed_compiled(bool async) else { var query = EF.CompileQuery( - (NorthwindContext context) => CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") + (NorthwindContext context) => context.Set() + .FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") .Where(c => c.ContactName.Contains("z"))); using (var context = CreateContext()) @@ -214,8 +205,7 @@ public virtual async Task FromSqlRaw_queryable_composed_compiled_with_parameter( if (async) { var query = EF.CompileAsyncQuery( - (NorthwindContext context) => CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + (NorthwindContext context) => context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""CustomerID""] = {0}", "CONSH") .Where(c => c.ContactName.Contains("z"))); @@ -229,8 +219,7 @@ public virtual async Task FromSqlRaw_queryable_composed_compiled_with_parameter( else { var query = EF.CompileQuery( - (NorthwindContext context) => CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + (NorthwindContext context) => context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""CustomerID""] = {0}", "CONSH") .Where(c => c.ContactName.Contains("z"))); @@ -255,8 +244,7 @@ public virtual async Task FromSqlRaw_queryable_composed_compiled_with_parameter( public virtual async Task FromSqlRaw_queryable_multiple_line_query(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = 'London'"); @@ -282,8 +270,7 @@ FROM root c public virtual async Task FromSqlRaw_queryable_composed_multiple_line_query(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") @@ -314,8 +301,7 @@ public async Task FromSqlRaw_queryable_with_parameters(bool async) var contactTitle = "Sales Representative"; using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = {0} AND c[""ContactTitle""] = {1}", city, contactTitle); @@ -342,8 +328,7 @@ SELECT c public async Task FromSqlRaw_queryable_with_parameters_inline(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = {0} AND c[""ContactTitle""] = {1}", "London", "Sales Representative"); @@ -373,8 +358,7 @@ public async Task FromSqlRaw_queryable_with_null_parameter(bool async) uint? reportsTo = null; using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Employee"" AND c[""ReportsTo""] = {0} OR (IS_NULL(c[""ReportsTo""]) AND IS_NULL({0}))", reportsTo); @@ -401,8 +385,7 @@ public async Task FromSqlRaw_queryable_with_parameters_and_closure(bool async) var contactTitle = "Sales Representative"; using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = {0}", city) .Where(c => c.ContactTitle == contactTitle); var queryString = query.ToQueryString(); @@ -431,9 +414,8 @@ SELECT c public virtual async Task FromSqlRaw_queryable_simple_cache_key_includes_query_string(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = 'London'"); + var query = context.Set() + .FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = 'London'"); var actual = async ? await query.ToArrayAsync() @@ -442,9 +424,8 @@ public virtual async Task FromSqlRaw_queryable_simple_cache_key_includes_query_s Assert.Equal(6, actual.Length); Assert.True(actual.All(c => c.City == "London")); - query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = 'Seattle'"); + query = context.Set() + .FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = 'Seattle'"); actual = async ? await query.ToArrayAsync() @@ -474,7 +455,7 @@ public virtual async Task FromSqlRaw_queryable_with_parameters_cache_key_include var sql = @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer"" AND c[""City""] = {0} AND c[""ContactTitle""] = {1}"; using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw(context.Set(), sql, city, contactTitle); + var query = context.Set().FromSqlRaw(sql, city, contactTitle); var actual = async ? await query.ToArrayAsync() @@ -487,7 +468,7 @@ public virtual async Task FromSqlRaw_queryable_with_parameters_cache_key_include city = "Madrid"; contactTitle = "Accounting Manager"; - query = CosmosQueryableExtensions.FromSqlRaw(context.Set(), sql, city, contactTitle); + query = context.Set().FromSqlRaw(sql, city, contactTitle); actual = async ? await query.ToArrayAsync() @@ -520,9 +501,7 @@ SELECT c public virtual async Task FromSqlRaw_queryable_simple_as_no_tracking_not_composed(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") + var query = context.Set().FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") .AsNoTracking(); var actual = async @@ -544,8 +523,7 @@ public virtual async Task FromSqlRaw_queryable_simple_as_no_tracking_not_compose public virtual async Task FromSqlRaw_queryable_simple_projection_composed(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), + var query = context.Set().FromSqlRaw( @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Product"" AND NOT c[""Discontinued""] AND ((c[""UnitsInStock""] + c[""UnitsOnOrder""]) < c[""ReorderLevel""])") @@ -571,9 +549,7 @@ FROM root c public virtual async Task FromSqlRaw_composed_with_nullable_predicate(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") + var query = context.Set().FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") .Where(c => c.ContactName == c.CompanyName); var actual = async @@ -597,8 +573,7 @@ public virtual async Task FromSqlRaw_does_not_parameterize_interpolated_string(b using var context = CreateContext(); var propertyName = "OrderID"; var max = 10250; - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Orders, + var query = context.Orders.FromSqlRaw( $@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Order"" AND c[""{propertyName}""] < {{0}}", max); var actual = async @@ -613,9 +588,7 @@ public virtual async Task FromSqlRaw_does_not_parameterize_interpolated_string(b public virtual async Task FromSqlRaw_queryable_simple_projection_not_composed(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions.FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") + var query = context.Set().FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Customer""") .Select( c => new { c.CustomerID, c.City }) .AsNoTracking(); @@ -639,10 +612,8 @@ public virtual async Task FromSqlRaw_queryable_simple_projection_not_composed(bo public async Task FromSqlRaw_queryable_simple_with_missing_key_and_non_tracking_throws(bool async) { using var context = CreateContext(); - var query = CosmosQueryableExtensions - .FromSqlRaw( - context.Set(), - @"SELECT * FROM root c WHERE c[""Discriminator""] = ""Category""") + var query = context.Set() + .FromSqlRaw(@"SELECT * FROM root c WHERE c[""Discriminator""] = ""Category""") .AsNoTracking(); var exception = async ? await Assert.ThrowsAsync(() => query.ToArrayAsync()) diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/InheritanceQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/InheritanceQueryCosmosTest.cs index 41fd82dd632..9958d72a336 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/InheritanceQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/InheritanceQueryCosmosTest.cs @@ -442,8 +442,8 @@ public override async Task GetType_in_hierarchy_in_abstract_base_type(bool async { await base.GetType_in_hierarchy_in_abstract_base_type(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE (c[""Discriminator""] IN (""Eagle"", ""Kiwi"") AND false)"); } @@ -452,8 +452,8 @@ public override async Task GetType_in_hierarchy_in_intermediate_type(bool async) { await base.GetType_in_hierarchy_in_intermediate_type(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE (c[""Discriminator""] IN (""Eagle"", ""Kiwi"") AND false)"); } @@ -462,8 +462,8 @@ public override async Task GetType_in_hierarchy_in_leaf_type_with_sibling(bool a { await base.GetType_in_hierarchy_in_leaf_type_with_sibling(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE (c[""Discriminator""] IN (""Eagle"", ""Kiwi"") AND (c[""Discriminator""] = ""Eagle""))"); } @@ -472,8 +472,8 @@ public override async Task GetType_in_hierarchy_in_leaf_type_with_sibling2(bool { await base.GetType_in_hierarchy_in_leaf_type_with_sibling2(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE (c[""Discriminator""] IN (""Eagle"", ""Kiwi"") AND (c[""Discriminator""] = ""Kiwi""))"); } @@ -482,8 +482,8 @@ public override async Task GetType_in_hierarchy_in_leaf_type_with_sibling2_rever { await base.GetType_in_hierarchy_in_leaf_type_with_sibling2_reverse(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE (c[""Discriminator""] IN (""Eagle"", ""Kiwi"") AND (c[""Discriminator""] = ""Kiwi""))"); } diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs index f8aa3238207..29e28e78351 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindFunctionsQueryCosmosTest.cs @@ -1208,7 +1208,7 @@ public override async Task Regex_IsMatch_MethodCall(bool async) await base.Regex_IsMatch_MethodCall(async); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(c[""CustomerID""], ""^T""))"); } @@ -1218,7 +1218,7 @@ public override async Task Regex_IsMatch_MethodCall_constant_input(bool async) await base.Regex_IsMatch_MethodCall_constant_input(async); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(""ALFKI"", c[""CustomerID""]))"); } @@ -1233,7 +1233,7 @@ await AssertQuery( entryCount: 6); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(c[""CustomerID""], ""^T""))"); } @@ -1248,7 +1248,7 @@ await AssertQuery( entryCount: 6); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(c[""CustomerID""], ""^T"", ""i""))"); } @@ -1263,7 +1263,7 @@ await AssertQuery( entryCount: 6); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(c[""CustomerID""], ""^T"", ""m""))"); } @@ -1278,7 +1278,7 @@ await AssertQuery( entryCount: 6); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(c[""CustomerID""], ""^T"", ""s""))"); } @@ -1293,7 +1293,7 @@ await AssertQuery( entryCount: 6); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(c[""CustomerID""], ""^T"", ""x""))"); } @@ -1304,11 +1304,12 @@ public virtual async Task Regex_IsMatch_MethodCall_With_Options_IgnoreCase_And_I { await AssertQuery( async, - ss => ss.Set().Where(o => Regex.IsMatch(o.CustomerID, "^T", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace)), + ss => ss.Set().Where( + o => Regex.IsMatch(o.CustomerID, "^T", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace)), entryCount: 6); AssertSql( - @"SELECT c + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND RegexMatch(c[""CustomerID""], ""^T"", ""ix""))"); } @@ -1316,16 +1317,19 @@ FROM root c [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Regex_IsMatch_MethodCall_With_Unsupported_Option(bool async) - => AssertTranslationFailed(() => AssertQuery( - async, - ss => ss.Set().Where(o => Regex.IsMatch(o.CustomerID, "^T", RegexOptions.RightToLeft)))); + => AssertTranslationFailed( + () => AssertQuery( + async, + ss => ss.Set().Where(o => Regex.IsMatch(o.CustomerID, "^T", RegexOptions.RightToLeft)))); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Regex_IsMatch_MethodCall_With_Any_Unsupported_Option(bool async) - => AssertTranslationFailed(() => AssertQuery( - async, - ss => ss.Set().Where(o => Regex.IsMatch(o.CustomerID, "^T", RegexOptions.IgnoreCase | RegexOptions.RightToLeft)))); + => AssertTranslationFailed( + () => AssertQuery( + async, + ss => ss.Set() + .Where(o => Regex.IsMatch(o.CustomerID, "^T", RegexOptions.IgnoreCase | RegexOptions.RightToLeft)))); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs index 5f3253d47e6..7e779aaacb6 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindKeylessEntitiesQueryCosmosTest.cs @@ -66,7 +66,7 @@ public override async Task KeylessEntity_with_nav_defining_query(bool async) { Assert.Equal( "0", - (await Assert.ThrowsAsync ( + (await Assert.ThrowsAsync( () => base.KeylessEntity_with_nav_defining_query(async))).Actual); AssertSql( diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs index 6b7b5e12452..677e078dc6a 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs @@ -3231,11 +3231,13 @@ await AssertTranslationFailed( AssertSql(); } - public override async Task Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(bool async) + public override async Task + Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(bool async) { // Cosmos client evaluation. Issue #17246. await AssertTranslationFailed( - () => base.Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(async)); + () => base + .Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(async)); AssertSql(); } @@ -4138,7 +4140,6 @@ await AssertTranslationFailedWithDetails( AssertSql(); } - public override async Task String_include_on_incorrect_property_throws(bool async) { await base.String_include_on_incorrect_property_throws(async); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindSelectQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindSelectQueryCosmosTest.cs index 5cab1737e16..c06a447ebc1 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindSelectQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindSelectQueryCosmosTest.cs @@ -1664,21 +1664,15 @@ FROM root c [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task List_from_result_of_single_result(bool async) - { - return base.List_from_result_of_single_result(async); - } + => base.List_from_result_of_single_result(async); [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task List_from_result_of_single_result_2(bool async) - { - return base.List_from_result_of_single_result_2(async); - } + => base.List_from_result_of_single_result_2(async); [ConditionalTheory(Skip = "Cross collection join Issue#17246")] public override Task List_from_result_of_single_result_3(bool async) - { - return base.List_from_result_of_single_result_3(async); - } + => base.List_from_result_of_single_result_3(async); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs index 8315a0808b7..a3e48480dff 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs @@ -882,7 +882,6 @@ FROM root c SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Employee"") AND (@__intPrm_0 = c[""ReportsTo""]))"); - } public override async Task Where_equals_on_matched_nullable_int_types(bool async) @@ -901,7 +900,6 @@ FROM root c SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Employee"") AND (c[""ReportsTo""] = @__nullableIntPrm_0))"); - } public override async Task Where_equals_on_null_nullable_int_types(bool async) @@ -1768,7 +1766,7 @@ public override async Task Where_navigation_contains(bool async) Assert.Equal( CosmosStrings.NonEmbeddedIncludeNotSupported( @"Navigation: Customer.Orders (List) Collection ToDependent Order Inverse: Customer PropertyAccessMode.Field"), - message); + message); AssertSql(); } @@ -2223,8 +2221,8 @@ public override async Task GetType_on_non_hierarchy1(bool async) { await base.GetType_on_non_hierarchy1(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE (c[""Discriminator""] = ""Customer"")"); } @@ -2233,8 +2231,8 @@ public override async Task GetType_on_non_hierarchy2(bool async) { await base.GetType_on_non_hierarchy2(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND false)"); } @@ -2243,8 +2241,8 @@ public override async Task GetType_on_non_hierarchy3(bool async) { await base.GetType_on_non_hierarchy3(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND false)"); } @@ -2253,8 +2251,8 @@ public override async Task GetType_on_non_hierarchy4(bool async) { await base.GetType_on_non_hierarchy4(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE (c[""Discriminator""] = ""Customer"")"); } @@ -2263,8 +2261,8 @@ public override async Task Case_block_simplification_works_correctly(bool async) { await base.Case_block_simplification_works_correctly(async); - AssertSql( - @"SELECT c + AssertSql( + @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND (((c[""Region""] = null) ? ""OR"" : c[""Region""]) = ""OR""))"); } @@ -2431,7 +2429,6 @@ public override async Task Array_of_parameters_Contains_OrElse_comparison_with_c @"SELECT c FROM root c WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""CustomerID""] IN (""ALFKI"", ""ANATR"") OR (c[""CustomerID""] = ""ANTON"")))"); - } public override async Task Multiple_OrElse_on_same_column_with_null_parameter_comparison_converted_to_in(bool async) diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/QueryLoggingCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/QueryLoggingCosmosTest.cs index b148721d1ff..2543026d711 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/QueryLoggingCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/QueryLoggingCosmosTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public class QueryLoggingCosmosTest : QueryLoggingCosmosTestBase, diff --git a/test/EFCore.Cosmos.Tests/Metadata/CosmosBuilderExtensionsTest.cs b/test/EFCore.Cosmos.Tests/Metadata/CosmosBuilderExtensionsTest.cs index 1a893b21184..cd6156b172e 100644 --- a/test/EFCore.Cosmos.Tests/Metadata/CosmosBuilderExtensionsTest.cs +++ b/test/EFCore.Cosmos.Tests/Metadata/CosmosBuilderExtensionsTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable once CheckNamespace + namespace Microsoft.EntityFrameworkCore.Metadata; public class CosmosBuilderExtensionsTest diff --git a/test/EFCore.Design.Tests/Design/DbContextActivatorTest.cs b/test/EFCore.Design.Tests/Design/DbContextActivatorTest.cs index 4ef587e9d72..ca0d1597026 100644 --- a/test/EFCore.Design.Tests/Design/DbContextActivatorTest.cs +++ b/test/EFCore.Design.Tests/Design/DbContextActivatorTest.cs @@ -7,19 +7,16 @@ public class DbContextActivatorTest { [ConditionalFact] public void CreateInstance_works() - { - Assert.IsType(DbContextActivator.CreateInstance(typeof(TestContext))); - } + => Assert.IsType(DbContextActivator.CreateInstance(typeof(TestContext))); [ConditionalFact] public void CreateInstance_with_arguments_works() - { - Assert.IsType(DbContextActivator.CreateInstance( - typeof(TestContext), - null, - null, - new[] { "A", "B" })); - } + => Assert.IsType( + DbContextActivator.CreateInstance( + typeof(TestContext), + null, + null, + new[] { "A", "B" })); private class TestContext : DbContext { diff --git a/test/EFCore.Design.Tests/Design/DesignTimeFlagTest.cs b/test/EFCore.Design.Tests/Design/DesignTimeFlagTest.cs index bce40e58d69..08a778b51ed 100644 --- a/test/EFCore.Design.Tests/Design/DesignTimeFlagTest.cs +++ b/test/EFCore.Design.Tests/Design/DesignTimeFlagTest.cs @@ -14,11 +14,12 @@ public void Operations_have_design_time_flag_set() var handler = new OperationResultHandler(); - new MockOperation(handler, () => - { - Assert.True(EF.IsDesignTime); - return "Twilight Sparkle"; - }); + new MockOperation( + handler, () => + { + Assert.True(EF.IsDesignTime); + return "Twilight Sparkle"; + }); Assert.False(EF.IsDesignTime); Assert.Equal("Twilight Sparkle", handler.Result); @@ -39,11 +40,12 @@ public void CreateInstance_with_arguments_sets_design_time_flag() { EF.IsDesignTime = false; - Assert.IsType(DbContextActivator.CreateInstance( - typeof(TestContext), - null, - null, - new[] { "A", "B" })); + Assert.IsType( + DbContextActivator.CreateInstance( + typeof(TestContext), + null, + null, + new[] { "A", "B" })); Assert.True(EF.IsDesignTime); } @@ -64,7 +66,9 @@ private class MockOperation : OperationExecutor.OperationBase { public MockOperation(IOperationResultHandler resultHandler, Func action) : base(resultHandler) - => Execute(action); + { + Execute(action); + } } } diff --git a/test/EFCore.Design.Tests/Design/Internal/CSharpHelperTest.cs b/test/EFCore.Design.Tests/Design/Internal/CSharpHelperTest.cs index 70237ba4cac..e2914637c71 100644 --- a/test/EFCore.Design.Tests/Design/Internal/CSharpHelperTest.cs +++ b/test/EFCore.Design.Tests/Design/Internal/CSharpHelperTest.cs @@ -460,11 +460,11 @@ public void Fragment_MethodCallCodeFragment_with_indent_works_when_chain_and_nes var method = new MethodCallCodeFragment(_testFuncMethodInfo, "One") .Chain( new MethodCallCodeFragment( - _testFuncMethodInfo, - new NestedClosureCodeFragment( - "x", - new MethodCallCodeFragment(_testFuncMethodInfo, "Two") - .Chain(new MethodCallCodeFragment(_testFuncMethodInfo, "Three"))))); + _testFuncMethodInfo, + new NestedClosureCodeFragment( + "x", + new MethodCallCodeFragment(_testFuncMethodInfo, "Two") + .Chain(new MethodCallCodeFragment(_testFuncMethodInfo, "Three"))))); var result = new CSharpHelper(TypeMappingSource).Fragment(method, indent: 1); @@ -485,11 +485,7 @@ public void Fragment_MethodCallCodeFragment_works_when_nested_closure_with_two_c _testFuncMethodInfo, new NestedClosureCodeFragment( "x", - new[] - { - new MethodCallCodeFragment(_testFuncMethodInfo, "One"), - new MethodCallCodeFragment(_testFuncMethodInfo, "Two") - })); + new[] { new MethodCallCodeFragment(_testFuncMethodInfo, "One"), new MethodCallCodeFragment(_testFuncMethodInfo, "Two") })); var result = new CSharpHelper(TypeMappingSource).Fragment(method); @@ -508,8 +504,8 @@ public void Fragment_MethodCallCodeFragment_with_indent_works_when_chain_and_nes { var method = new MethodCallCodeFragment(_testFuncMethodInfo, "One") .Chain( - new MethodCallCodeFragment( - _testFuncMethodInfo, + new MethodCallCodeFragment( + _testFuncMethodInfo, new NestedClosureCodeFragment( "x", new[] diff --git a/test/EFCore.Design.Tests/DesignApiConsistencyTest.cs b/test/EFCore.Design.Tests/DesignApiConsistencyTest.cs index 13cfe384b6b..25d297674dd 100644 --- a/test/EFCore.Design.Tests/DesignApiConsistencyTest.cs +++ b/test/EFCore.Design.Tests/DesignApiConsistencyTest.cs @@ -25,12 +25,18 @@ public class DesignApiConsistencyFixture : ApiConsistencyFixtureBase public override HashSet NonVirtualMethods { get; } = new() { - typeof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper).GetProperty(nameof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper.FormatProvider)).GetMethod, - typeof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper).GetProperty(nameof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper.FormatProvider)).SetMethod, - typeof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper).GetMethod(nameof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper.ToStringWithCulture)), - typeof(CSharpDbContextGeneratorBase.ToStringInstanceHelper).GetProperty(nameof(CSharpDbContextGeneratorBase.ToStringInstanceHelper.FormatProvider)).GetMethod, - typeof(CSharpDbContextGeneratorBase.ToStringInstanceHelper).GetProperty(nameof(CSharpDbContextGeneratorBase.ToStringInstanceHelper.FormatProvider)).SetMethod, - typeof(CSharpDbContextGeneratorBase.ToStringInstanceHelper).GetMethod(nameof(CSharpDbContextGeneratorBase.ToStringInstanceHelper.ToStringWithCulture)) + typeof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper) + .GetProperty(nameof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper.FormatProvider)).GetMethod, + typeof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper) + .GetProperty(nameof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper.FormatProvider)).SetMethod, + typeof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper).GetMethod( + nameof(CSharpEntityTypeGeneratorBase.ToStringInstanceHelper.ToStringWithCulture)), + typeof(CSharpDbContextGeneratorBase.ToStringInstanceHelper) + .GetProperty(nameof(CSharpDbContextGeneratorBase.ToStringInstanceHelper.FormatProvider)).GetMethod, + typeof(CSharpDbContextGeneratorBase.ToStringInstanceHelper) + .GetProperty(nameof(CSharpDbContextGeneratorBase.ToStringInstanceHelper.FormatProvider)).SetMethod, + typeof(CSharpDbContextGeneratorBase.ToStringInstanceHelper).GetMethod( + nameof(CSharpDbContextGeneratorBase.ToStringInstanceHelper.ToStringWithCulture)) }; } } diff --git a/test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationsGeneratorTest.cs b/test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationsGeneratorTest.cs index 93171e2b22b..93d29756da3 100644 --- a/test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationsGeneratorTest.cs +++ b/test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationsGeneratorTest.cs @@ -90,7 +90,8 @@ public void Test_new_annotations_handled_for_entity_types() RelationalAnnotationNames.ModelDependencies, RelationalAnnotationNames.FieldValueGetter, RelationalAnnotationNames.JsonPropertyName, - RelationalAnnotationNames.ContainerColumnName, // Appears on entity type but requires specific model (i.e. owned types that can map to json, otherwise validation throws) + // Appears on entity type but requires specific model (i.e. owned types that can map to json, otherwise validation throws) + RelationalAnnotationNames.ContainerColumnName, RelationalAnnotationNames.ContainerColumnTypeMapping, }; @@ -110,8 +111,7 @@ public void Test_new_annotations_handled_for_entity_types() + @"(""WithAnnotations"", ""MySchema"")") }, { - RelationalAnnotationNames.MappingStrategy, - (RelationalAnnotationNames.TphMappingStrategy, + RelationalAnnotationNames.MappingStrategy, (RelationalAnnotationNames.TphMappingStrategy, _toTable + ";" + _nl @@ -141,9 +141,12 @@ public void Test_new_annotations_handled_for_entity_types() { RelationalAnnotationNames.Comment, ("My Comment", _nl - + @"entityTypeBuilder.ToTable(""WithAnnotations"", t =>" + _nl - + " {" + _nl - + @" t.HasComment(""My Comment"");" + _nl + + @"entityTypeBuilder.ToTable(""WithAnnotations"", t =>" + + _nl + + " {" + + _nl + + @" t.HasComment(""My Comment"");" + + _nl + " })") }, { @@ -153,19 +156,31 @@ public void Test_new_annotations_handled_for_entity_types() (Expression.Lambda(Expression.Constant(null)), _toNullTable) }, { - RelationalAnnotationNames.ViewName, - ("MyView", _toNullTable + ";" + _nl + _nl - + "entityTypeBuilder." + nameof(RelationalEntityTypeBuilderExtensions.ToView) + @"(""MyView"")") + RelationalAnnotationNames.ViewName, ("MyView", _toNullTable + + ";" + + _nl + + _nl + + "entityTypeBuilder." + + nameof(RelationalEntityTypeBuilderExtensions.ToView) + + @"(""MyView"")") }, { - RelationalAnnotationNames.FunctionName, - (null, _toNullTable + ";" + _nl + _nl - + "entityTypeBuilder." + nameof(RelationalEntityTypeBuilderExtensions.ToFunction) + @"(null)") + RelationalAnnotationNames.FunctionName, (null, _toNullTable + + ";" + + _nl + + _nl + + "entityTypeBuilder." + + nameof(RelationalEntityTypeBuilderExtensions.ToFunction) + + @"(null)") }, { - RelationalAnnotationNames.SqlQuery, - (null, _toNullTable + ";" + _nl + _nl - + "entityTypeBuilder." + nameof(RelationalEntityTypeBuilderExtensions.ToSqlQuery) + @"(null)") + RelationalAnnotationNames.SqlQuery, (null, _toNullTable + + ";" + + _nl + + _nl + + "entityTypeBuilder." + + nameof(RelationalEntityTypeBuilderExtensions.ToSqlQuery) + + @"(null)") } }; diff --git a/test/EFCore.Design.Tests/Migrations/Design/MigrationScaffolderTest.cs b/test/EFCore.Design.Tests/Migrations/Design/MigrationScaffolderTest.cs index fb9bccaaf17..2c4d6144fa7 100644 --- a/test/EFCore.Design.Tests/Migrations/Design/MigrationScaffolderTest.cs +++ b/test/EFCore.Design.Tests/Migrations/Design/MigrationScaffolderTest.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Infrastructure.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; diff --git a/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs b/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs index c977a53806b..fb261d6306d 100644 --- a/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs +++ b/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs @@ -745,47 +745,55 @@ public virtual void Entity_splitting_is_stored_in_snapshot_with_tables() b.Ignore(e => e.OrderInfo); b.Property("Shadow").HasColumnName("Shadow"); - b.ToTable("Order", tb => - { - tb.Property(e => e.Id).UseIdentityColumn(2, 3).HasAnnotation("fii", "arr"); - tb.Property("Shadow"); - }); - b.SplitToTable("SplitOrder", sb => - { - sb.Property("Shadow"); - sb.HasTrigger("splitTrigger").HasAnnotation("oof", "rab"); - sb.HasAnnotation("foo", "bar"); - }); - - b.OwnsOne(p => p.OrderBillingDetails, od => - { - od.OwnsOne(c => c.StreetAddress); - - od.Property("BillingShadow"); - od.ToTable("SplitOrder", tb => + b.ToTable( + "Order", tb => { - tb.Property("BillingShadow").HasColumnName("Shadow"); + tb.Property(e => e.Id).UseIdentityColumn(2, 3).HasAnnotation("fii", "arr"); + tb.Property("Shadow"); }); - od.SplitToTable("BillingDetails", sb => + b.SplitToTable( + "SplitOrder", sb => { - sb.Property("BillingShadow").HasColumnName("Shadow"); + sb.Property("Shadow"); + sb.HasTrigger("splitTrigger").HasAnnotation("oof", "rab"); + sb.HasAnnotation("foo", "bar"); }); - }); - b.OwnsOne(p => p.OrderShippingDetails, od => - { - od.OwnsOne(c => c.StreetAddress).ToTable("ShippingDetails"); - - od.Property("ShippingShadow"); - od.ToTable("Order", tb => + b.OwnsOne( + p => p.OrderBillingDetails, od => { - tb.Property("ShippingShadow").HasColumnName("Shadow"); + od.OwnsOne(c => c.StreetAddress); + + od.Property("BillingShadow"); + od.ToTable( + "SplitOrder", tb => + { + tb.Property("BillingShadow").HasColumnName("Shadow"); + }); + od.SplitToTable( + "BillingDetails", sb => + { + sb.Property("BillingShadow").HasColumnName("Shadow"); + }); }); - od.SplitToTable("ShippingDetails", sb => + + b.OwnsOne( + p => p.OrderShippingDetails, od => { - sb.Property("ShippingShadow"); + od.OwnsOne(c => c.StreetAddress).ToTable("ShippingDetails"); + + od.Property("ShippingShadow"); + od.ToTable( + "Order", tb => + { + tb.Property("ShippingShadow").HasColumnName("Shadow"); + }); + od.SplitToTable( + "ShippingDetails", sb => + { + sb.Property("ShippingShadow"); + }); }); - }); }); }, AddBoilerPlate( @@ -981,12 +989,14 @@ public virtual void Entity_splitting_is_stored_in_snapshot_with_tables() Assert.Equal(4, relationalModel.Tables.Count()); var orderTable = relationalModel.FindTable(orderEntityType.GetTableName()!, orderEntityType.GetSchema()); - Assert.Equal(new []{ orderEntityType, shippingEntityType }, + Assert.Equal( + new[] { orderEntityType, shippingEntityType }, orderTable.FindColumn("Shadow").PropertyMappings.Select(m => m.TableMapping.EntityType)); var fragment = orderEntityType.GetMappingFragments().Single(); var splitTable = relationalModel.FindTable(fragment.StoreObject.Name, fragment.StoreObject.Schema); - Assert.Equal(new[] { billingEntityType, orderEntityType }, + Assert.Equal( + new[] { billingEntityType, orderEntityType }, splitTable.FindColumn("Shadow").PropertyMappings.Select(m => m.TableMapping.EntityType)); Assert.Equal("bar", fragment["foo"]); @@ -997,12 +1007,14 @@ public virtual void Entity_splitting_is_stored_in_snapshot_with_tables() var billingFragment = billingEntityType.GetMappingFragments().Single(); var billingTable = relationalModel.FindTable(billingFragment.StoreObject.Name, billingFragment.StoreObject.Schema); - Assert.Equal(new[] { billingEntityType }, + Assert.Equal( + new[] { billingEntityType }, billingTable.FindColumn("Shadow").PropertyMappings.Select(m => m.TableMapping.EntityType)); var shippingFragment = shippingEntityType.GetMappingFragments().Single(); var shippingTable = relationalModel.FindTable(shippingFragment.StoreObject.Name, shippingFragment.StoreObject.Schema); - Assert.Equal(new[] { shippingEntityType }, + Assert.Equal( + new[] { shippingEntityType }, shippingTable.FindColumn("ShippingShadow").PropertyMappings.Select(m => m.TableMapping.EntityType)); Assert.Equal(new[] { "Id", "Shadow" }, orderTable.Columns.Select(c => c.Name)); @@ -1020,28 +1032,32 @@ public virtual void Entity_splitting_is_stored_in_snapshot_with_views() b => { b.Property("Shadow"); - b.ToView("EntityWithOneProperty", tb => - { - tb.Property("Shadow"); - }); - b.SplitToView("SplitView", sb => - { - sb.Property("Shadow"); - }); + b.ToView( + "EntityWithOneProperty", tb => + { + tb.Property("Shadow"); + }); + b.SplitToView( + "SplitView", sb => + { + sb.Property("Shadow"); + }); b.OwnsOne( eo => eo.EntityWithTwoProperties, eb => { eb.Ignore(e => e.EntityWithStringKey); - eb.ToView("EntityWithOneProperty", tb => - { - tb.Property(e => e.AlternateId).HasColumnName("SomeId"); - }); - eb.SplitToView("SplitView", sb => - { - sb.Property(e => e.AlternateId).HasColumnName("SomeOtherId"); - }); + eb.ToView( + "EntityWithOneProperty", tb => + { + tb.Property(e => e.AlternateId).HasColumnName("SomeId"); + }); + eb.SplitToView( + "SplitView", sb => + { + sb.Property(e => e.AlternateId).HasColumnName("SomeOtherId"); + }); }); }); }, @@ -1284,7 +1300,8 @@ public virtual void HiLoSequence_with_default_model_schema() modelBuilder => modelBuilder .HasDefaultSchema("dbo") .Entity("Entity").Property("Id").UseHiLo(schema: "dbo"), - AddBoilerPlate(@" + AddBoilerPlate( + @" modelBuilder .HasDefaultSchema(""dbo"") .HasAnnotation(""Relational:MaxIdentifierLength"", 128); @@ -1319,7 +1336,8 @@ public virtual void CheckConstraint_is_stored_in_snapshot_as_fluent_api() => Test( builder => { - builder.Entity().ToTable(tb => + builder.Entity().ToTable( + tb => tb.HasCheckConstraint("AlternateId", "AlternateId > Id") .HasName("CK_Customer_AlternateId") .HasAnnotation("foo", "bar")); @@ -1450,12 +1468,13 @@ public virtual void Triggers_and_ExcludeFromMigrations_are_stored_in_snapshot() builder => { builder.Entity() - .ToTable(tb => - { - tb.HasTrigger("SomeTrigger1"); - tb.HasTrigger("SomeTrigger2"); - tb.ExcludeFromMigrations(); - }); + .ToTable( + tb => + { + tb.HasTrigger("SomeTrigger1"); + tb.HasTrigger("SomeTrigger2"); + tb.ExcludeFromMigrations(); + }); builder.Ignore(); }, AddBoilerPlate( @@ -3532,7 +3551,8 @@ public virtual void Snapshot_with_OwnedNavigationBuilder_HasCheckConstraint_comp modelBuilder.Entity() .OwnsMany( o => o.OwnedEntities, - ownee => ownee.ToTable(tb => tb.HasCheckConstraint("CK_TestOwnee_TestEnum_Enum_Constraint", "[TestEnum] IN (0, 1, 2)"))); + ownee => ownee.ToTable( + tb => tb.HasCheckConstraint("CK_TestOwnee_TestEnum_Enum_Constraint", "[TestEnum] IN (0, 1, 2)"))); }, @"// using Microsoft.EntityFrameworkCore; @@ -3621,17 +3641,19 @@ public virtual void Owned_types_mapped_to_json_are_stored_in_snapshot() { b.HasKey(x => x.Id).HasName("PK_Custom"); - b.OwnsOne(x => x.EntityWithTwoProperties, bb => + b.OwnsOne( + x => x.EntityWithTwoProperties, bb => { bb.ToJson(); bb.Ignore(x => x.Id); bb.Property(x => x.AlternateId).HasJsonPropertyName("NotKey"); bb.WithOwner(e => e.EntityWithOneProperty); - bb.OwnsOne(x => x.EntityWithStringKey, bbb => - { - bbb.Ignore(x => x.Id); - bbb.OwnsMany(x => x.Properties, bbbb => bbbb.HasJsonPropertyName("JsonProps")); - }); + bb.OwnsOne( + x => x.EntityWithStringKey, bbb => + { + bbb.Ignore(x => x.Id); + bbb.OwnsMany(x => x.Properties, bbbb => bbbb.HasJsonPropertyName("JsonProps")); + }); }); }); }, @@ -5121,14 +5143,44 @@ public virtual void Index_IsDescending_is_stored_in_snapshot() builder.Entity( e => { - e.HasIndex(t => new { t.X, t.Y, t.Z }, "IX_unspecified"); - e.HasIndex(t => new { t.X, t.Y, t.Z }, "IX_empty") + e.HasIndex( + t => new + { + t.X, + t.Y, + t.Z + }, "IX_unspecified"); + e.HasIndex( + t => new + { + t.X, + t.Y, + t.Z + }, "IX_empty") .IsDescending(); - e.HasIndex(t => new { t.X, t.Y, t.Z }, "IX_all_ascending") + e.HasIndex( + t => new + { + t.X, + t.Y, + t.Z + }, "IX_all_ascending") .IsDescending(false, false, false); - e.HasIndex(t => new { t.X, t.Y, t.Z }, "IX_all_descending") + e.HasIndex( + t => new + { + t.X, + t.Y, + t.Z + }, "IX_all_descending") .IsDescending(true, true, true); - e.HasIndex(t => new { t.X, t.Y, t.Z }, "IX_mixed") + e.HasIndex( + t => new + { + t.X, + t.Y, + t.Z + }, "IX_mixed") .IsDescending(false, true, false); }); }, diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpDbContextGeneratorTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpDbContextGeneratorTest.cs index 1f7d9345d59..7d0bcf8d4b7 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpDbContextGeneratorTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpDbContextGeneratorTest.cs @@ -351,8 +351,7 @@ public Task ModelInDifferentNamespaceDbContext_works() { var modelGenerationOptions = new ModelCodeGenerationOptions { - ContextNamespace = "TestNamespace", - ModelNamespace = "AnotherNamespaceOfModel" + ContextNamespace = "TestNamespace", ModelNamespace = "AnotherNamespaceOfModel" }; const string entityInAnotherNamespaceTypeName = "EntityInAnotherNamespace"; @@ -1146,15 +1145,20 @@ public Task Sequences_work() .IncrementsBy(2) .HasMin(2) .HasMax(100) - .IsCyclic(true), + .IsCyclic(), new ModelCodeGenerationOptions(), code => Assert.Contains( - @".HasSequence(""EvenNumbers"", ""dbo"")" + _nl + - " .StartsAt(2L)" + _nl + - " .IncrementsBy(2)" + _nl + - " .HasMin(2L)" + _nl + - " .HasMax(100L)" + _nl + - " .IsCyclic();", + @".HasSequence(""EvenNumbers"", ""dbo"")" + + _nl + + " .StartsAt(2L)" + + _nl + + " .IncrementsBy(2)" + + _nl + + " .HasMin(2L)" + + _nl + + " .HasMax(100L)" + + _nl + + " .IsCyclic();", code.ContextFile.Code), model => { @@ -1240,7 +1244,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) var entityType = model.FindEntityType("TestNamespace.Employee")!; var triggers = entityType.GetDeclaredTriggers(); - Assert.Collection(triggers, + Assert.Collection( + triggers, t => Assert.Equal("Trigger1", t.GetDatabaseName()), t => Assert.Equal("Trigger2", t.GetDatabaseName())); }); @@ -1299,7 +1304,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) } ", code.ContextFile); - }, model => { diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs index af4fbd68cc8..e8be03c4d58 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs @@ -1288,8 +1288,9 @@ public Task Comments_complex_are_generated() "Entity", x => { - x.ToTable(tb => tb.HasComment( - @"Entity Comment + x.ToTable( + tb => tb.HasComment( + @"Entity Comment On multiple lines With XML content
")); x.Property("Id").HasComment( diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpRuntimeModelCodeGeneratorTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpRuntimeModelCodeGeneratorTest.cs index 32f8293c544..a6f25ac4bea 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpRuntimeModelCodeGeneratorTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpRuntimeModelCodeGeneratorTest.cs @@ -4,24 +4,24 @@ using System.Collections; using System.ComponentModel; using System.Data; -using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Cosmos.ValueGeneration.Internal; using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Query.SqlExpressions; +using Microsoft.EntityFrameworkCore.Scaffolding.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding.TestModel.Internal; using Microsoft.EntityFrameworkCore.Sqlite.Design.Internal; using Microsoft.EntityFrameworkCore.SqlServer.Design.Internal; using Microsoft.EntityFrameworkCore.SqlServer.Metadata.Internal; -using Microsoft.EntityFrameworkCore.TestModels.AspNetIdentity; using Microsoft.EntityFrameworkCore.ValueGeneration.Internal; -using Microsoft.Extensions.Options; using NetTopologySuite; using NetTopologySuite.Geometries; using Newtonsoft.Json.Linq; using static Microsoft.EntityFrameworkCore.Migrations.Design.CSharpMigrationsGeneratorTest; using static Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpRuntimeModelCodeGeneratorTest; +using IdentityUser = Microsoft.EntityFrameworkCore.TestModels.AspNetIdentity.IdentityUser; using Index = Microsoft.EntityFrameworkCore.Scaffolding.Internal.Index; public class GlobalNamespaceContext : ContextBase @@ -46,7 +46,7 @@ public class CSharpRuntimeModelCodeGeneratorTest [ConditionalFact] public void Self_referential_property() => Test( - new TestModel.Internal.SelfReferentialDbContext(), + new SelfReferentialDbContext(), new CompiledModelCodeGenerationOptions(), assertModel: model => { @@ -55,7 +55,6 @@ public void Self_referential_property() } ); - [ConditionalFact] public void Empty_model() => Test( @@ -1735,11 +1734,8 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) Assert.Equal( CoreStrings.RuntimeModelMissingData, Assert.Throws(() => model.GetCollation()).Message); - Assert.Equal(new[] - { - RelationalAnnotationNames.MaxIdentifierLength, - SqlServerAnnotationNames.ValueGenerationStrategy - }, + Assert.Equal( + new[] { RelationalAnnotationNames.MaxIdentifierLength, SqlServerAnnotationNames.ValueGenerationStrategy }, model.GetAnnotations().Select(a => a.Name)); Assert.Equal(SqlServerValueGenerationStrategy.IdentityColumn, model.GetValueGenerationStrategy()); Assert.Equal( @@ -1772,11 +1768,8 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) Assert.Throws(() => principalBase.GetSeedData()).Message); var principalId = principalBase.FindProperty(nameof(PrincipalBase.Id)); - Assert.Equal(new[] - { - RelationalAnnotationNames.RelationalOverrides, - SqlServerAnnotationNames.ValueGenerationStrategy - }, + Assert.Equal( + new[] { RelationalAnnotationNames.RelationalOverrides, SqlServerAnnotationNames.ValueGenerationStrategy }, principalId.GetAnnotations().Select(a => a.Name)); Assert.Equal(typeof(long?), principalId.ClrType); Assert.Equal(typeof(long?), principalId.PropertyInfo.PropertyType); @@ -1839,10 +1832,8 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) Assert.Equal("AK_PrincipalBase_Id", principalAlternateKey.GetName()); var principalKey = principalBase.GetKeys().Last(); - Assert.Equal(new[] - { - RelationalAnnotationNames.Name - }, + Assert.Equal( + new[] { RelationalAnnotationNames.Name }, principalKey.GetAnnotations().Select(a => a.Name)); Assert.Equal(new[] { principalId, principalAlternateId }, principalKey.Properties); Assert.True(principalKey.IsPrimaryKey()); @@ -1855,10 +1846,8 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) Assert.Equal(new[] { principalAlternateKey, principalKey }, principalId.GetContainingKeys()); var referenceOwnedNavigation = principalBase.GetNavigations().Single(); - Assert.Equal(new[] - { - CoreAnnotationNames.EagerLoaded - }, + Assert.Equal( + new[] { CoreAnnotationNames.EagerLoaded }, referenceOwnedNavigation.GetAnnotations().Select(a => a.Name)); Assert.Equal(nameof(PrincipalBase.Owned), referenceOwnedNavigation.Name); Assert.False(referenceOwnedNavigation.IsCollection); @@ -2231,12 +2220,19 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .IsSparse() .UseCollation("Latin1_General_CI_AI"); - ob.ToTable("PrincipalBase", "mySchema", + ob.ToTable( + "PrincipalBase", "mySchema", t => t.Property("PrincipalBaseId").UseIdentityColumn(2, 3)); ob.SplitToTable("Details", s => s.Property(e => e.Details)); - ob.HasData(new { Number = 10, PrincipalBaseId = 1L, PrincipalBaseAlternateId = new Guid() }); + ob.HasData( + new + { + Number = 10, + PrincipalBaseId = 1L, + PrincipalBaseAlternateId = new Guid() + }); }); eb.Navigation(e => e.Owned).IsRequired().HasField("_ownedField") @@ -2964,18 +2960,21 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) eb.ToTable("PrincipalBase"); eb.ToView("PrincipalBaseView", tb => tb.Property(e => e.Id).HasAnnotation("foo", "bar2")); - eb.InsertUsingStoredProcedure(s => s - .HasParameter("PrincipalBaseId") - .HasParameter("PrincipalDerivedId") - .HasParameter(p => p.Id, pb => pb.HasName("BaseId").IsOutput().HasAnnotation("foo", "bar")) - .HasAnnotation("foo", "bar1")); - eb.UpdateUsingStoredProcedure(s => s - .HasParameter("PrincipalBaseId") - .HasParameter("PrincipalDerivedId") - .HasOriginalValueParameter(p => p.Id)); - eb.DeleteUsingStoredProcedure(s => s - .HasRowsAffectedReturnValue() - .HasOriginalValueParameter(p => p.Id)); + eb.InsertUsingStoredProcedure( + s => s + .HasParameter("PrincipalBaseId") + .HasParameter("PrincipalDerivedId") + .HasParameter(p => p.Id, pb => pb.HasName("BaseId").IsOutput().HasAnnotation("foo", "bar")) + .HasAnnotation("foo", "bar1")); + eb.UpdateUsingStoredProcedure( + s => s + .HasParameter("PrincipalBaseId") + .HasParameter("PrincipalDerivedId") + .HasOriginalValueParameter(p => p.Id)); + eb.DeleteUsingStoredProcedure( + s => s + .HasRowsAffectedReturnValue() + .HasOriginalValueParameter(p => p.Id)); eb.HasIndex(new[] { "PrincipalBaseId" }, "PrincipalIndex") .IsUnique() @@ -2999,16 +2998,19 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) eb.ToTable("PrincipalDerived"); eb.ToView("PrincipalDerivedView"); - eb.InsertUsingStoredProcedure("Derived_Insert", s => s - .HasParameter("PrincipalBaseId") - .HasParameter("PrincipalDerivedId") - .HasResultColumn(p => p.Id, pb => pb.HasName("DerivedId").HasAnnotation("foo", "bar3"))); - eb.UpdateUsingStoredProcedure("Derived_Update", "Derived", s => s - .HasParameter("PrincipalBaseId") - .HasParameter("PrincipalDerivedId") - .HasOriginalValueParameter(p => p.Id)); - eb.DeleteUsingStoredProcedure("Derived_Delete", s => s - .HasOriginalValueParameter(p => p.Id)); + eb.InsertUsingStoredProcedure( + "Derived_Insert", s => s + .HasParameter("PrincipalBaseId") + .HasParameter("PrincipalDerivedId") + .HasResultColumn(p => p.Id, pb => pb.HasName("DerivedId").HasAnnotation("foo", "bar3"))); + eb.UpdateUsingStoredProcedure( + "Derived_Update", "Derived", s => s + .HasParameter("PrincipalBaseId") + .HasParameter("PrincipalDerivedId") + .HasOriginalValueParameter(p => p.Id)); + eb.DeleteUsingStoredProcedure( + "Derived_Delete", s => s + .HasOriginalValueParameter(p => p.Id)); }); modelBuilder.Entity>( @@ -3056,7 +3058,7 @@ public DependentBase(TKey id) Id = id; } - private new TKey Id { get; init; } + private new TKey Id { get; } public PrincipalDerived> Principal { get; set; } } @@ -4283,10 +4285,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) eb.ToTable( tb => - { - tb.HasTrigger("Trigger1"); - tb.HasTrigger("Trigger2"); - }); + { + tb.HasTrigger("Trigger1"); + tb.HasTrigger("Trigger2"); + }); }); } } @@ -4909,7 +4911,6 @@ public class IdentityUser : TestModels.AspNetIdentity.IdentityUser { } - public class SelfReferentialEntity { public long Id { get; set; } @@ -4947,7 +4948,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); - modelBuilder.Entity( + modelBuilder.Entity( eb => { eb.Property(e => e.Collection).HasConversion(typeof(SelfReferentialPropertyValueConverter)); @@ -4955,14 +4956,16 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) } } - public class SelfReferentialPropertyValueConverter : ValueConverter + public class SelfReferentialPropertyValueConverter : ValueConverter { public SelfReferentialPropertyValueConverter() - : this(null) - { } + : this(null) + { + } public SelfReferentialPropertyValueConverter(ConverterMappingHints hints) - : base(v => null, v => null, hints) - { } + : base(v => null, v => null, hints) + { + } } } diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorSelectorTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorSelectorTest.cs index e05d4609c8d..96f9c8b311f 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorSelectorTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorSelectorTest.cs @@ -12,17 +12,10 @@ public void Select_returns_last_service_for_language() { var expected = new TestModelCodeGenerator("C#"); var selector = new ModelCodeGeneratorSelector( - new[] - { - new TestModelCodeGenerator("C#"), - expected - }); + new[] { new TestModelCodeGenerator("C#"), expected }); var result = selector.Select( - new ModelCodeGenerationOptions - { - Language = "C#" - }); + new ModelCodeGenerationOptions { Language = "C#" }); Assert.Same(expected, result); } @@ -31,14 +24,8 @@ public void Select_returns_last_service_for_language() public void Select_throws_when_no_service_for_language() { var selector = new ModelCodeGeneratorSelector( - new[] - { - new TestModelCodeGenerator("C#") - }); - var options = new ModelCodeGenerationOptions - { - Language = "VB" - }; + new[] { new TestModelCodeGenerator("C#") }); + var options = new ModelCodeGenerationOptions { Language = "VB" }; var ex = Assert.Throws( () => selector.Select(options)); @@ -60,11 +47,7 @@ public void Select_returns_last_templated_service_with_templates() }); var result = selector.Select( - new ModelCodeGenerationOptions - { - Language = "C#", - ProjectDir = Directory.GetCurrentDirectory() - }); + new ModelCodeGenerationOptions { Language = "C#", ProjectDir = Directory.GetCurrentDirectory() }); Assert.Same(expected, result); } @@ -74,18 +57,10 @@ public void Select_returns_last_service_for_language_when_no_templates() { var expected = new TestModelCodeGenerator("C#"); var selector = new ModelCodeGeneratorSelector( - new IModelCodeGenerator[] - { - new TestTemplatedModelGenerator(hasTemplates: false), - new TestModelCodeGenerator("C#"), - expected - }); + new IModelCodeGenerator[] { new TestTemplatedModelGenerator(hasTemplates: false), new TestModelCodeGenerator("C#"), expected }); var result = selector.Select( - new ModelCodeGenerationOptions - { - Language = "C#" - }); + new ModelCodeGenerationOptions { Language = "C#" }); Assert.Same(expected, result); } @@ -93,8 +68,10 @@ public void Select_returns_last_service_for_language_when_no_templates() private class TestModelCodeGenerator : ModelCodeGenerator { public TestModelCodeGenerator(string language) - : base(new()) - => Language = language; + : base(new ModelCodeGeneratorDependencies()) + { + Language = language; + } public override string Language { get; } @@ -107,8 +84,10 @@ private class TestTemplatedModelGenerator : TemplatedModelGenerator private readonly bool _hasTemplates; public TestTemplatedModelGenerator(bool hasTemplates) - : base(new()) - => _hasTemplates = hasTemplates; + : base(new ModelCodeGeneratorDependencies()) + { + _hasTemplates = hasTemplates; + } public override ScaffoldedModel GenerateModel(IModel model, ModelCodeGenerationOptions options) => throw new NotImplementedException(); diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestBase.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestBase.cs index 3429f2c81f4..2bb0d3a50d1 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestBase.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestBase.cs @@ -38,9 +38,11 @@ protected async Task TestAsync( var generators = services.BuildServiceProvider(validateScopes: true) .GetServices(); - var generator = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || Random.Shared.Next() % 12 != 0 - ? generators.Last(g => g is CSharpModelGenerator) - : generators.Last(g => g is TextTemplatingModelGenerator); + var generator = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) + || RuntimeInformation.IsOSPlatform(OSPlatform.OSX) + || Random.Shared.Next() % 12 != 0 + ? generators.Last(g => g is CSharpModelGenerator) + : generators.Last(g => g is TextTemplatingModelGenerator); options.ModelNamespace ??= "TestNamespace"; options.ContextName = "TestDbContext"; diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestFixture.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestFixture.cs index 28caf8f3cf5..1244b7a15e6 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestFixture.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestFixture.cs @@ -10,20 +10,22 @@ public ModelCodeGeneratorTestFixture() var templatesDir = Path.Combine(ProjectDir, "CodeTemplates", "EFCore"); Directory.CreateDirectory(templatesDir); - using (var input = typeof(ModelCodeGeneratorTestBase).Assembly.GetManifestResourceStream("Microsoft.EntityFrameworkCore.Resources.CSharpDbContextGenerator.tt")) + using (var input = typeof(ModelCodeGeneratorTestBase).Assembly.GetManifestResourceStream( + "Microsoft.EntityFrameworkCore.Resources.CSharpDbContextGenerator.tt")) using (var output = File.OpenWrite(Path.Combine(templatesDir, "DbContext.t4"))) { input.CopyTo(output); } - using (var input = typeof(ModelCodeGeneratorTestBase).Assembly.GetManifestResourceStream("Microsoft.EntityFrameworkCore.Resources.CSharpEntityTypeGenerator.tt")) + using (var input = typeof(ModelCodeGeneratorTestBase).Assembly.GetManifestResourceStream( + "Microsoft.EntityFrameworkCore.Resources.CSharpEntityTypeGenerator.tt")) using (var output = File.OpenWrite(Path.Combine(templatesDir, "EntityType.t4"))) { input.CopyTo(output); } } - public TempDirectory ProjectDir { get; } = new TempDirectory(); + public TempDirectory ProjectDir { get; } = new(); public void Dispose() => ProjectDir.Dispose(); diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs index 4aafb2de1c5..4ed24857daa 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs @@ -155,10 +155,8 @@ public void Get_DatabaseName(string expectedValue) var database = new DatabaseModel { DatabaseName = expectedValue }; var model = _factory.Create(database, options); Assert.Equal(expectedValue, model.GetDatabaseName()); - } - [ConditionalFact] public void Loads_column_types() { @@ -1439,7 +1437,12 @@ public void Index_descending() { Table = Table, Name = "IX_unspecified", - Columns = { table.Columns[0], table.Columns[1], table.Columns[2] } + Columns = + { + table.Columns[0], + table.Columns[1], + table.Columns[2] + } }); table.Indexes.Add( @@ -1447,8 +1450,18 @@ public void Index_descending() { Table = Table, Name = "IX_all_ascending", - Columns = { table.Columns[0], table.Columns[1], table.Columns[2] }, - IsDescending = { false, false, false } + Columns = + { + table.Columns[0], + table.Columns[1], + table.Columns[2] + }, + IsDescending = + { + false, + false, + false + } }); table.Indexes.Add( @@ -1456,8 +1469,18 @@ public void Index_descending() { Table = Table, Name = "IX_all_descending", - Columns = { table.Columns[0], table.Columns[1], table.Columns[2] }, - IsDescending = { true, true, true } + Columns = + { + table.Columns[0], + table.Columns[1], + table.Columns[2] + }, + IsDescending = + { + true, + true, + true + } }); table.Indexes.Add( @@ -1465,8 +1488,18 @@ public void Index_descending() { Table = Table, Name = "IX_mixed", - Columns = { table.Columns[0], table.Columns[1], table.Columns[2] }, - IsDescending = { false, true, false } + Columns = + { + table.Columns[0], + table.Columns[1], + table.Columns[2] + }, + IsDescending = + { + false, + true, + false + } }); var model = _factory.Create( diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingEngineHostTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingEngineHostTest.cs index 927a1569129..1fd71e38ffc 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingEngineHostTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingEngineHostTest.cs @@ -12,7 +12,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal; [PlatformSkipCondition(TestUtilities.Xunit.TestPlatform.Linux | TestUtilities.Xunit.TestPlatform.Mac, SkipReason = "CI time out")] public class TextTemplatingEngineHostTest { - public static readonly Engine _engine = new Engine(); + public static readonly Engine _engine = new(); [ConditionalFact] public void Service_works() @@ -33,13 +33,7 @@ public void Service_works() [ConditionalFact] public void Session_works() { - var host = new TextTemplatingEngineHost - { - Session = new TextTemplatingSession - { - ["Value"] = "Hello, Session!" - } - }; + var host = new TextTemplatingEngineHost { Session = new TextTemplatingSession { ["Value"] = "Hello, Session!" } }; var result = _engine.ProcessTemplate( @"<#= Session[""Value""] #>", @@ -52,13 +46,7 @@ public void Session_works() [ConditionalFact] public void Session_works_with_parameter() { - var host = new TextTemplatingEngineHost - { - Session = new TextTemplatingSession - { - ["Value"] = "Hello, Session!" - } - }; + var host = new TextTemplatingEngineHost { Session = new TextTemplatingSession { ["Value"] = "Hello, Session!" } }; var result = _engine.ProcessTemplate( @"<#@ parameter name=""Value"" type=""System.String"" #><#= Value #>", @@ -76,10 +64,7 @@ public void Include_works() Path.Combine(dir, "test.ttinclude"), "Hello, Include!"); - var host = new TextTemplatingEngineHost - { - TemplateFile = Path.Combine(dir, "test.tt") - }; + var host = new TextTemplatingEngineHost { TemplateFile = Path.Combine(dir, "test.tt") }; var result = _engine.ProcessTemplate( @"<#@ include file=""test.ttinclude"" #>", @@ -120,10 +105,7 @@ public void ResolvePath_work() { using var dir = new TempDirectory(); - var host = new TextTemplatingEngineHost - { - TemplateFile = Path.Combine(dir, "test.tt") - }; + var host = new TextTemplatingEngineHost { TemplateFile = Path.Combine(dir, "test.tt") }; var result = _engine.ProcessTemplate( @"<#@ template hostSpecific=""true"" #><#= Host.ResolvePath(""data.json"") #>", diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingModelGeneratorTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingModelGeneratorTest.cs index 6a0fc2e1124..5f751554751 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingModelGeneratorTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingModelGeneratorTest.cs @@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.SqlServer.Design.Internal; using Microsoft.EntityFrameworkCore.TestUtilities.Xunit; @@ -82,7 +81,7 @@ public void GenerateModel_uses_templates() var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -119,7 +118,7 @@ public void GenerateModel_works_when_no_entity_type_template() var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -150,7 +149,7 @@ public void GenerateModel_works_when_no_context_template_and_csharp() var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -181,7 +180,7 @@ public void GenerateModel_throws_when_no_context_template_and_not_csharp() var ex = Assert.Throws( () => generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -227,7 +226,7 @@ public void GenerateModel_sets_session_variables() var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -285,7 +284,7 @@ public void GenerateModel_defaults_to_model_namespace_when_no_context_namespace( var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -332,7 +331,7 @@ public void GenerateModel_uses_output_extension() var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -366,7 +365,7 @@ public void GenerateModel_warns_when_output_encoding() var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -401,7 +400,7 @@ public void GenerateModel_reports_errors() var ex = Assert.Throws( () => generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -445,7 +444,7 @@ public void GenerateModel_reports_warnings() var result = generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", @@ -482,7 +481,6 @@ public void GenerateModel_reports_compiler_errors() contextTemplate, "<# #error This is a compiler error #>"); - var reporter = new TestOperationReporter(); var generator = CreateGenerator(reporter); var model = new ModelBuilder() @@ -491,7 +489,7 @@ public void GenerateModel_reports_compiler_errors() var ex = Assert.Throws( () => generator.GenerateModel( model, - new() + new ModelCodeGenerationOptions { ContextName = "Context", ConnectionString = @"Name=DefaultConnection", diff --git a/test/EFCore.InMemory.FunctionalTests/BuiltInDataTypesInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/BuiltInDataTypesInMemoryTest.cs index 9aeb68c0c1c..3b7dde95bd3 100644 --- a/test/EFCore.InMemory.FunctionalTests/BuiltInDataTypesInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/BuiltInDataTypesInMemoryTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class BuiltInDataTypesInMemoryTest : BuiltInDataTypesTestBase diff --git a/test/EFCore.InMemory.FunctionalTests/DataAnnotationInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/DataAnnotationInMemoryTest.cs index ddcf2ca101a..a1e2b1a5fee 100644 --- a/test/EFCore.InMemory.FunctionalTests/DataAnnotationInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/DataAnnotationInMemoryTest.cs @@ -10,7 +10,8 @@ public DataAnnotationInMemoryTest(DataAnnotationInMemoryFixture fixture) { } - protected override TestHelpers TestHelpers => InMemoryTestHelpers.Instance; + protected override TestHelpers TestHelpers + => InMemoryTestHelpers.Instance; public override void ConcurrencyCheckAttribute_throws_if_value_in_database_changed() { diff --git a/test/EFCore.InMemory.FunctionalTests/DatabaseInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/DatabaseInMemoryTest.cs index 49016a3ce15..c0e2edfa20e 100644 --- a/test/EFCore.InMemory.FunctionalTests/DatabaseInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/DatabaseInMemoryTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class DatabaseInMemoryTest diff --git a/test/EFCore.InMemory.FunctionalTests/EndToEndTest.cs b/test/EFCore.InMemory.FunctionalTests/EndToEndTest.cs index 75674fd9b39..1b89c402560 100644 --- a/test/EFCore.InMemory.FunctionalTests/EndToEndTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/EndToEndTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class EndToEndInMemoryTest : IClassFixture diff --git a/test/EFCore.InMemory.FunctionalTests/Query/GearsOfWarQueryInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/Query/GearsOfWarQueryInMemoryTest.cs index 456a34a15d6..049f36e53e2 100644 --- a/test/EFCore.InMemory.FunctionalTests/Query/GearsOfWarQueryInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/Query/GearsOfWarQueryInMemoryTest.cs @@ -90,7 +90,7 @@ public override async Task Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_c .Actual); public override Task Null_semantics_is_correctly_applied_for_function_comparisons_that_take_arguments_from_optional_navigation( - bool async) + bool async) // Null protection. Issue #13721. => Assert.ThrowsAsync( () => base.Null_semantics_is_correctly_applied_for_function_comparisons_that_take_arguments_from_optional_navigation(async)); diff --git a/test/EFCore.InMemory.FunctionalTests/Query/SimpleQueryInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/Query/SimpleQueryInMemoryTest.cs index a9ce9846793..1a76f99b2de 100644 --- a/test/EFCore.InMemory.FunctionalTests/Query/SimpleQueryInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/Query/SimpleQueryInMemoryTest.cs @@ -5,7 +5,7 @@ namespace Microsoft.EntityFrameworkCore.Query; public class SimpleQueryInMemoryTest : SimpleQueryTestBase { - public async override Task Multiple_nested_reference_navigations(bool async) + public override async Task Multiple_nested_reference_navigations(bool async) { var contextFactory = await InitializeAsync(); using var context = contextFactory.CreateContext(); @@ -30,7 +30,7 @@ public async override Task Multiple_nested_reference_navigations(bool async) Assert.NotNull(appraisal.Staff.SecondaryManager); Assert.Equal(2, appraisal.Staff.SecondaryManagerId); } - + protected override ITestStoreFactory TestStoreFactory => InMemoryTestStoreFactory.Instance; } diff --git a/test/EFCore.InMemory.FunctionalTests/StoreGeneratedFixupInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/StoreGeneratedFixupInMemoryTest.cs index a1928393431..1f7f667de0e 100644 --- a/test/EFCore.InMemory.FunctionalTests/StoreGeneratedFixupInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/StoreGeneratedFixupInMemoryTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class StoreGeneratedFixupInMemoryTest : StoreGeneratedFixupTestBase< diff --git a/test/EFCore.OData.FunctionalTests/Properties/TestAssemblyConditions.cs b/test/EFCore.OData.FunctionalTests/Properties/TestAssemblyConditions.cs index b9e595c9ce7..3913c4c9043 100644 --- a/test/EFCore.OData.FunctionalTests/Properties/TestAssemblyConditions.cs +++ b/test/EFCore.OData.FunctionalTests/Properties/TestAssemblyConditions.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // Skip the entire assembly if not on Windows and no external SQL Server is configured + [assembly: SqlServerConfiguredCondition] diff --git a/test/EFCore.Proxies.Tests/ProxyTests.cs b/test/EFCore.Proxies.Tests/ProxyTests.cs index 0e8cd0bafbd..d1ebdc5b7b4 100644 --- a/test/EFCore.Proxies.Tests/ProxyTests.cs +++ b/test/EFCore.Proxies.Tests/ProxyTests.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using Castle.DynamicProxy; -using Castle.DynamicProxy.Generators; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/FiltersInheritanceBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/FiltersInheritanceBulkUpdatesTestBase.cs index 7011a2f92d2..0752cec0e17 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/FiltersInheritanceBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/FiltersInheritanceBulkUpdatesTestBase.cs @@ -59,9 +59,9 @@ public virtual Task Delete_GroupBy_Where_Select_First(bool async) => AssertDelete( async, ss => ss.Set() - .GroupBy(e => e.CountryId) - .Where(g => g.Count() < 3) - .Select(g => g.First()), + .GroupBy(e => e.CountryId) + .Where(g => g.Count() < 3) + .Select(g => g.First()), rowsAffectedCount: 1); [ConditionalTheory(Skip = "Issue#26753")] @@ -69,8 +69,10 @@ public virtual Task Delete_GroupBy_Where_Select_First(bool async) public virtual Task Delete_GroupBy_Where_Select_First_2(bool async) => AssertDelete( async, - ss => ss.Set().Where(e => e == ss.Set().GroupBy(e => e.CountryId) - .Where(g => g.Count() < 3).Select(g => g.First()).FirstOrDefault()), + ss => ss.Set().Where( + e => e + == ss.Set().GroupBy(e => e.CountryId) + .Where(g => g.Count() < 3).Select(g => g.First()).FirstOrDefault()), rowsAffectedCount: 1); [ConditionalTheory] @@ -78,8 +80,9 @@ public virtual Task Delete_GroupBy_Where_Select_First_2(bool async) public virtual Task Delete_GroupBy_Where_Select_First_3(bool async) => AssertDelete( async, - ss => ss.Set().Where(e => ss.Set().GroupBy(e => e.CountryId) - .Where(g => g.Count() < 3).Select(g => g.First()).Any(i => i == e)), + ss => ss.Set().Where( + e => ss.Set().GroupBy(e => e.CountryId) + .Where(g => g.Count() < 3).Select(g => g.First()).Any(i => i == e)), rowsAffectedCount: 1); [ConditionalTheory] diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/IBulkUpdatesFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/IBulkUpdatesFixtureBase.cs index 6fd8d2f3cda..a6238608472 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/IBulkUpdatesFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/IBulkUpdatesFixtureBase.cs @@ -5,7 +5,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public interface IBulkUpdatesFixtureBase : IQueryFixtureBase { - Action GetUseTransaction() => UseTransaction; + Action GetUseTransaction() + => UseTransaction; void UseTransaction(DatabaseFacade facade, IDbContextTransaction transaction); } diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesFixtureBase.cs index 40227581efa..d6229d1df3e 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesFixtureBase.cs @@ -5,7 +5,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public abstract class InheritanceBulkUpdatesFixtureBase : InheritanceQueryFixtureBase, IBulkUpdatesFixtureBase { - protected override string StoreName => "InheritanceBulkUpdatesTest"; + protected override string StoreName + => "InheritanceBulkUpdatesTest"; public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) => base.AddOptions(builder).ConfigureWarnings(w => w.Log(CoreEventId.FirstWithoutOrderByAndFilterWarning)); diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesTestBase.cs index 7b90eb47c40..f7beaa7aeed 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/InheritanceBulkUpdatesTestBase.cs @@ -59,9 +59,9 @@ public virtual Task Delete_GroupBy_Where_Select_First(bool async) => AssertDelete( async, ss => ss.Set() - .GroupBy(e => e.CountryId) - .Where( g=> g.Count() < 3) - .Select(g => g.First()), + .GroupBy(e => e.CountryId) + .Where(g => g.Count() < 3) + .Select(g => g.First()), rowsAffectedCount: 2); [ConditionalTheory(Skip = "Issue#26753")] @@ -69,8 +69,10 @@ public virtual Task Delete_GroupBy_Where_Select_First(bool async) public virtual Task Delete_GroupBy_Where_Select_First_2(bool async) => AssertDelete( async, - ss => ss.Set().Where(e => e == ss.Set().GroupBy(e => e.CountryId) - .Where(g => g.Count() < 3).Select(g => g.First()).FirstOrDefault()), + ss => ss.Set().Where( + e => e + == ss.Set().GroupBy(e => e.CountryId) + .Where(g => g.Count() < 3).Select(g => g.First()).FirstOrDefault()), rowsAffectedCount: 2); [ConditionalTheory] @@ -78,8 +80,9 @@ public virtual Task Delete_GroupBy_Where_Select_First_2(bool async) public virtual Task Delete_GroupBy_Where_Select_First_3(bool async) => AssertDelete( async, - ss => ss.Set().Where(e => ss.Set().GroupBy(e => e.CountryId) - .Where(g => g.Count() < 3).Select(g => g.First()).Any(i => i == e)), + ss => ss.Set().Where( + e => ss.Set().GroupBy(e => e.CountryId) + .Where(g => g.Count() < 3).Select(g => g.First()).Any(i => i == e)), rowsAffectedCount: 2); [ConditionalTheory] diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/NonSharedModelBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/NonSharedModelBulkUpdatesTestBase.cs index cac3879fcfc..c50604ce78c 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/NonSharedModelBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/NonSharedModelBulkUpdatesTestBase.cs @@ -5,7 +5,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public abstract class NonSharedModelBulkUpdatesTestBase : NonSharedModelTestBase { - protected override string StoreName => "NonSharedModelBulkUpdatesTests"; + protected override string StoreName + => "NonSharedModelBulkUpdatesTests"; #nullable enable [ConditionalTheory] @@ -13,7 +14,8 @@ public abstract class NonSharedModelBulkUpdatesTestBase : NonSharedModelTestBase public virtual async Task Delete_predicate_based_on_optional_navigation(bool async) { var contextFactory = await InitializeAsync(); - await AssertDelete(async, contextFactory.CreateContext, + await AssertDelete( + async, contextFactory.CreateContext, context => context.Posts.Where(p => p.Blog!.Title!.StartsWith("Arthur")), rowsAffectedCount: 1); } @@ -24,8 +26,11 @@ public Context28745(DbContextOptions options) { } - public DbSet Blogs => Set(); - public DbSet Posts => Set(); + public DbSet Blogs + => Set(); + + public DbSet Posts + => Set(); protected override void OnModelCreating(ModelBuilder modelBuilder) { @@ -56,7 +61,6 @@ public class Post #nullable disable - #region HelperMethods public async Task AssertDelete( @@ -135,7 +139,7 @@ public void UseTransaction(DatabaseFacade facade, IDbContextTransaction transact => facade.UseTransaction(transaction.GetDbTransaction()); protected TestSqlLoggerFactory TestSqlLoggerFactory - => (TestSqlLoggerFactory)ListLoggerFactory; + => (TestSqlLoggerFactory)ListLoggerFactory; protected void ClearLog() => TestSqlLoggerFactory.Clear(); diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesFixture.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesFixture.cs index f42f82f2fa7..e0b5b213f1a 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesFixture.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesFixture.cs @@ -3,10 +3,12 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; -public abstract class NorthwindBulkUpdatesFixture : NorthwindQueryRelationalFixture, IBulkUpdatesFixtureBase +public abstract class NorthwindBulkUpdatesFixture : NorthwindQueryRelationalFixture, + IBulkUpdatesFixtureBase where TModelCustomizer : IModelCustomizer, new() { - protected override string StoreName => "BulkUpdatesNorthwind"; + protected override string StoreName + => "BulkUpdatesNorthwind"; public void UseTransaction(DatabaseFacade facade, IDbContextTransaction transaction) => facade.UseTransaction(transaction.GetDbTransaction()); diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs index 35ba793dce5..1d5f6adbdb2 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs @@ -111,10 +111,12 @@ public virtual Task Delete_Where_predicate_with_GroupBy_aggregate(bool async) => AssertDelete( async, ss => ss.Set() - .Where(e => e.OrderID < ss.Set() - .GroupBy(o => o.CustomerID) - .Where(g => g.Count() > 11) - .Select(g => g.First()).First().OrderID), + .Where( + e => e.OrderID + < ss.Set() + .GroupBy(o => o.CustomerID) + .Where(g => g.Count() > 11) + .Select(g => g.First()).First().OrderID), rowsAffectedCount: 284); [ConditionalTheory] @@ -123,10 +125,11 @@ public virtual Task Delete_Where_predicate_with_GroupBy_aggregate_2(bool async) => AssertDelete( async, ss => ss.Set() - .Where(e => ss.Set() - .GroupBy(o => o.CustomerID) - .Where(g => g.Count() > 9) - .Select(g => g.First()).Contains(e.Order)), + .Where( + e => ss.Set() + .GroupBy(o => o.CustomerID) + .Where(g => g.Count() > 9) + .Select(g => g.First()).Contains(e.Order)), rowsAffectedCount: 109); [ConditionalTheory(Skip = "Issue#28525")] @@ -135,9 +138,9 @@ public virtual Task Delete_GroupBy_Where_Select(bool async) => AssertDelete( async, ss => ss.Set() - .GroupBy(od => od.OrderID) - .Where(g => g.Count() > 5) - .Select(g => g.First()), + .GroupBy(od => od.OrderID) + .Where(g => g.Count() > 5) + .Select(g => g.First()), rowsAffectedCount: 284); [ConditionalTheory(Skip = "Issue#26753")] @@ -146,7 +149,10 @@ public virtual Task Delete_GroupBy_Where_Select_2(bool async) => AssertDelete( async, ss => ss.Set() - .Where(od => od == ss.Set().GroupBy(od => od.OrderID).Where(g => g.Count() > 5).Select(g => g.First()).FirstOrDefault()), + .Where( + od => od + == ss.Set().GroupBy(od => od.OrderID).Where(g => g.Count() > 5).Select(g => g.First()) + .FirstOrDefault()), rowsAffectedCount: 284); [ConditionalTheory] @@ -203,7 +209,7 @@ public virtual Task Delete_Union(bool async) => AssertDelete( async, ss => ss.Set().Where(od => od.OrderID < 10250) - .Union(ss.Set().Where(od => od.OrderID > 11250)), + .Union(ss.Set().Where(od => od.OrderID > 11250)), rowsAffectedCount: 5); [ConditionalTheory] @@ -212,7 +218,7 @@ public virtual Task Delete_Concat(bool async) => AssertDelete( async, ss => ss.Set().Where(od => od.OrderID < 10250) - .Concat(ss.Set().Where(od => od.OrderID > 11250)), + .Concat(ss.Set().Where(od => od.OrderID > 11250)), rowsAffectedCount: 5); [ConditionalTheory] @@ -221,7 +227,7 @@ public virtual Task Delete_Intersect(bool async) => AssertDelete( async, ss => ss.Set().Where(od => od.OrderID < 10250) - .Intersect(ss.Set().Where(od => od.OrderID > 11250)), + .Intersect(ss.Set().Where(od => od.OrderID > 11250)), rowsAffectedCount: 0); [ConditionalTheory] @@ -230,7 +236,7 @@ public virtual Task Delete_Except(bool async) => AssertDelete( async, ss => ss.Set().Where(od => od.OrderID < 10250) - .Except(ss.Set().Where(od => od.OrderID > 11250)), + .Except(ss.Set().Where(od => od.OrderID > 11250)), rowsAffectedCount: 5); [ConditionalTheory] @@ -251,7 +257,7 @@ public virtual Task Delete_non_entity_projection_2(bool async) () => AssertDelete( async, ss => ss.Set().Where(od => od.OrderID < 10250) - .Select(e => new OrderDetail { OrderID = e.OrderID, ProductID = e.ProductID }), + .Select(e => new OrderDetail { OrderID = e.OrderID, ProductID = e.ProductID }), rowsAffectedCount: 0)); [ConditionalTheory] @@ -262,7 +268,7 @@ public virtual Task Delete_non_entity_projection_3(bool async) () => AssertDelete( async, ss => ss.Set().Where(od => od.OrderID < 10250) - .Select(e => new { OrderDetail = e, e.ProductID }), + .Select(e => new { OrderDetail = e, e.ProductID }), rowsAffectedCount: 0)); [ConditionalTheory] @@ -275,8 +281,8 @@ await TestHelpers.ExecuteWithStrategyInTransactionAsync( () => Fixture.CreateContext(), (DatabaseFacade facade, IDbContextTransaction transaction) => Fixture.UseTransaction(facade, transaction), async context => await context.Set().FromSqlRaw( - NormalizeDelimitersInRawString( - @"SELECT [OrderID], [ProductID], [UnitPrice], [Quantity], [Discount] + NormalizeDelimitersInRawString( + @"SELECT [OrderID], [ProductID], [UnitPrice], [Quantity], [Discount] FROM [Order Details] WHERE [OrderID] < 10300")) .ExecuteDeleteAsync()); @@ -287,8 +293,8 @@ FROM [Order Details] () => Fixture.CreateContext(), (DatabaseFacade facade, IDbContextTransaction transaction) => Fixture.UseTransaction(facade, transaction), context => context.Set().FromSqlRaw( - NormalizeDelimitersInRawString( - @"SELECT [OrderID], [ProductID], [UnitPrice], [Quantity], [Discount] + NormalizeDelimitersInRawString( + @"SELECT [OrderID], [ProductID], [UnitPrice], [Quantity], [Discount] FROM [Order Details] WHERE [OrderID] < 10300")) .ExecuteDelete()); @@ -312,7 +318,7 @@ public virtual Task Delete_with_join(bool async) async, ss => from od in ss.Set() join o in ss.Set().Where(o => o.OrderID < 10300).OrderBy(e => e.OrderID).Skip(0).Take(100) - on od.OrderID equals o.OrderID + on od.OrderID equals o.OrderID select od, rowsAffectedCount: 140); @@ -323,7 +329,7 @@ public virtual Task Delete_with_left_join(bool async) async, ss => from od in ss.Set().Where(e => e.OrderID < 10276) join o in ss.Set().Where(o => o.OrderID < 10300).OrderBy(e => e.OrderID).Skip(0).Take(100) - on od.OrderID equals o.OrderID into grouping + on od.OrderID equals o.OrderID into grouping from o in grouping.DefaultIfEmpty() select od, rowsAffectedCount: 74); @@ -409,12 +415,12 @@ public virtual Task Update_Where_set_parameter(bool async) { var value = "Abc"; return AssertUpdate( - async, - ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), - e => e, - s => s.SetProperty(c => c.ContactName, c => value), - rowsAffectedCount: 8, - (b, a) => Assert.All(a, c => Assert.Equal("Abc", c.ContactName))); + async, + ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), + e => e, + s => s.SetProperty(c => c.ContactName, c => value), + rowsAffectedCount: 8, + (b, a) => Assert.All(a, c => Assert.Equal("Abc", c.ContactName))); } [ConditionalTheory] @@ -511,8 +517,10 @@ public virtual Task Update_Where_GroupBy_aggregate_set_constant(bool async) => AssertUpdate( async, ss => ss.Set() - .Where(c => c.CustomerID == ss.Set() - .GroupBy(e => e.CustomerID).Where(g => g.Count() > 11).Select(e => e.Key).FirstOrDefault()), + .Where( + c => c.CustomerID + == ss.Set() + .GroupBy(e => e.CustomerID).Where(g => g.Count() > 11).Select(e => e.Key).FirstOrDefault()), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), rowsAffectedCount: 1, @@ -524,8 +532,10 @@ public virtual Task Update_Where_GroupBy_First_set_constant(bool async) => AssertUpdate( async, ss => ss.Set() - .Where(c => c.CustomerID == ss.Set() - .GroupBy(e => e.CustomerID).Where(g => g.Count() > 11).Select(e => e.First().CustomerID).FirstOrDefault()), + .Where( + c => c.CustomerID + == ss.Set() + .GroupBy(e => e.CustomerID).Where(g => g.Count() > 11).Select(e => e.First().CustomerID).FirstOrDefault()), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), rowsAffectedCount: 1, @@ -537,8 +547,10 @@ public virtual Task Update_Where_GroupBy_First_set_constant_2(bool async) => AssertUpdate( async, ss => ss.Set() - .Where(c => c == ss.Set() - .GroupBy(e => e.CustomerID).Where(g => g.Count() > 11).Select(e => e.First().Customer).FirstOrDefault()), + .Where( + c => c + == ss.Set() + .GroupBy(e => e.CustomerID).Where(g => g.Count() > 11).Select(e => e.First().Customer).FirstOrDefault()), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), rowsAffectedCount: 1, @@ -550,7 +562,8 @@ public virtual Task Update_Where_GroupBy_First_set_constant_3(bool async) => AssertUpdate( async, ss => ss.Set() - .Where(c => ss.Set() + .Where( + c => ss.Set() .GroupBy(e => e.CustomerID).Where(g => g.Count() > 11).Select(e => e.First().Customer).Contains(c)), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), @@ -605,12 +618,12 @@ public virtual Task Update_Where_SelectMany_set_null(bool async) [MemberData(nameof(IsAsyncData))] public virtual Task Update_Where_set_property_plus_constant(bool async) => AssertUpdate( - async, - ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), - e => e, - s => s.SetProperty(c => c.ContactName, c => c.ContactName + "Abc"), - rowsAffectedCount: 8, - (b, a) => b.Zip(a).ForEach(e => Assert.Equal(e.First.ContactName + "Abc", e.Second.ContactName))); + async, + ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), + e => e, + s => s.SetProperty(c => c.ContactName, c => c.ContactName + "Abc"), + rowsAffectedCount: 8, + (b, a) => b.Zip(a).ForEach(e => Assert.Equal(e.First.ContactName + "Abc", e.Second.ContactName))); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -618,24 +631,24 @@ public virtual Task Update_Where_set_property_plus_parameter(bool async) { var value = "Abc"; return AssertUpdate( - async, - ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), - e => e, - s => s.SetProperty(c => c.ContactName, c => c.ContactName + value), - rowsAffectedCount: 8, - (b, a) => b.Zip(a).ForEach(e => Assert.Equal(e.First.ContactName + "Abc", e.Second.ContactName))); + async, + ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), + e => e, + s => s.SetProperty(c => c.ContactName, c => c.ContactName + value), + rowsAffectedCount: 8, + (b, a) => b.Zip(a).ForEach(e => Assert.Equal(e.First.ContactName + "Abc", e.Second.ContactName))); } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Update_Where_set_property_plus_property(bool async) => AssertUpdate( - async, - ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), - e => e, - s => s.SetProperty(c => c.ContactName, c => c.ContactName + c.CustomerID), - rowsAffectedCount: 8, - (b, a) => b.Zip(a).ForEach(e => Assert.Equal(e.First.ContactName + e.First.CustomerID, e.Second.ContactName))); + async, + ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), + e => e, + s => s.SetProperty(c => c.ContactName, c => c.ContactName + c.CustomerID), + rowsAffectedCount: 8, + (b, a) => b.Zip(a).ForEach(e => Assert.Equal(e.First.ContactName + e.First.CustomerID, e.Second.ContactName))); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -689,12 +702,13 @@ public virtual Task Update_Where_multiple_set(bool async) { var value = "Abc"; return AssertUpdate( - async, - ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), - e => e, - s => s.SetProperty(c => c.ContactName, c => value).SetProperty(c => c.City, c => "Seattle"), - rowsAffectedCount: 8, - (b, a) => Assert.All(a, c => + async, + ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")), + e => e, + s => s.SetProperty(c => c.ContactName, c => value).SetProperty(c => c.City, c => "Seattle"), + rowsAffectedCount: 8, + (b, a) => Assert.All( + a, c => { Assert.Equal("Abc", c.ContactName); Assert.Equal("Seattle", c.City); @@ -716,12 +730,12 @@ public virtual Task Update_with_invalid_lambda_in_set_property_throws(bool async [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Update_multiple_entity_throws(bool async) - => AssertTranslationFailed( + => AssertTranslationFailed( RelationalStrings.MultipleEntityPropertiesInSetProperty("Order", "Customer"), () => AssertUpdate( async, ss => ss.Set().Where(o => o.CustomerID.StartsWith("F")) - .Select(e => new { e, e.Customer }), + .Select(e => new { e, e.Customer }), e => e.Customer, s => s.SetProperty(c => c.Customer.ContactName, c => "Name").SetProperty(c => c.e.OrderDate, e => new DateTime(2020, 1, 1)), rowsAffectedCount: 0)); @@ -730,7 +744,8 @@ public virtual Task Update_multiple_entity_throws(bool async) [MemberData(nameof(IsAsyncData))] public virtual Task Update_unmapped_property_throws(bool async) => AssertTranslationFailed( - RelationalStrings.UnableToTranslateSetProperty("c => c.IsLondon", "c => True", + RelationalStrings.UnableToTranslateSetProperty( + "c => c.IsLondon", "c => True", CoreStrings.QueryUnableToTranslateMember("IsLondon", "Customer")), () => AssertUpdate( async, @@ -745,7 +760,7 @@ public virtual Task Update_Union_set_constant(bool async) => AssertUpdate( async, ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")) - .Union(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), + .Union(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), rowsAffectedCount: 12, @@ -757,7 +772,7 @@ public virtual Task Update_Concat_set_constant(bool async) => AssertUpdate( async, ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")) - .Concat(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), + .Concat(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), rowsAffectedCount: 12, @@ -769,7 +784,7 @@ public virtual Task Update_Except_set_constant(bool async) => AssertUpdate( async, ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")) - .Except(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), + .Except(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), rowsAffectedCount: 8, @@ -781,7 +796,7 @@ public virtual Task Update_Intersect_set_constant(bool async) => AssertUpdate( async, ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")) - .Intersect(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), + .Intersect(ss.Set().Where(c => c.CustomerID.StartsWith("A"))), e => e, s => s.SetProperty(c => c.ContactName, c => "Updated"), rowsAffectedCount: 0, @@ -794,7 +809,7 @@ public virtual Task Update_with_join_set_constant(bool async) async, ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) join o in ss.Set().Where(o => o.OrderID < 10300) - on c.CustomerID equals o.CustomerID + on c.CustomerID equals o.CustomerID select new { c, o }, e => e.c, s => s.SetProperty(c => c.c.ContactName, c => "Updated"), @@ -808,7 +823,7 @@ public virtual Task Update_with_left_join_set_constant(bool async) async, ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) join o in ss.Set().Where(o => o.OrderID < 10300) - on c.CustomerID equals o.CustomerID into grouping + on c.CustomerID equals o.CustomerID into grouping from o in grouping.DefaultIfEmpty() select new { c, o }, e => e.c, @@ -863,9 +878,14 @@ public virtual Task Update_with_cross_join_left_join_set_constant(bool async) ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) from c2 in ss.Set().Where(c => c.City.StartsWith("S")) join o in ss.Set().Where(o => o.OrderID < 10300) - on c.CustomerID equals o.CustomerID into grouping + on c.CustomerID equals o.CustomerID into grouping from o in grouping.DefaultIfEmpty() - select new { c, c2, o }, + select new + { + c, + c2, + o + }, e => e.c, s => s.SetProperty(c => c.c.ContactName, c => "Updated"), rowsAffectedCount: 8, @@ -893,7 +913,12 @@ public virtual Task Update_with_cross_join_outer_apply_set_constant(bool async) ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) from c2 in ss.Set().Where(c => c.City.StartsWith("S")) from o in ss.Set().Where(o => o.OrderID < 10300 && o.OrderDate.Value.Year < c.ContactName.Length).DefaultIfEmpty() - select new { c, c2, o }, + select new + { + c, + c2, + o + }, e => e.c, s => s.SetProperty(c => c.c.ContactName, c => "Updated"), rowsAffectedCount: 8, @@ -909,8 +934,8 @@ await TestHelpers.ExecuteWithStrategyInTransactionAsync( () => Fixture.CreateContext(), (DatabaseFacade facade, IDbContextTransaction transaction) => Fixture.UseTransaction(facade, transaction), async context => await context.Set().FromSqlRaw( - NormalizeDelimitersInRawString( - @"SELECT [Region], [PostalCode], [Phone], [Fax], [CustomerID], [Country], [ContactTitle], [ContactName], [CompanyName], [City], [Address] + NormalizeDelimitersInRawString( + @"SELECT [Region], [PostalCode], [Phone], [Fax], [CustomerID], [Country], [ContactTitle], [ContactName], [CompanyName], [City], [Address] FROM [Customers] WHERE [CustomerID] LIKE 'A%'")) .ExecuteUpdateAsync(s => s.SetProperty(c => c.ContactName, c => "Updated"))); @@ -921,8 +946,8 @@ FROM [Customers] () => Fixture.CreateContext(), (DatabaseFacade facade, IDbContextTransaction transaction) => Fixture.UseTransaction(facade, transaction), context => context.Set().FromSqlRaw( - NormalizeDelimitersInRawString( - @"SELECT [Region], [PostalCode], [Phone], [Fax], [CustomerID], [Country], [ContactTitle], [ContactName], [CompanyName], [City], [Address] + NormalizeDelimitersInRawString( + @"SELECT [Region], [PostalCode], [Phone], [Fax], [CustomerID], [Country], [ContactTitle], [ContactName], [CompanyName], [City], [Address] FROM [Customers] WHERE [CustomerID] LIKE 'A%'")) .ExecuteUpdate(s => s.SetProperty(c => c.ContactName, c => "Updated"))); @@ -932,71 +957,73 @@ FROM [Customers] [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Update_Where_SelectMany_subquery_set_null(bool async) - => AssertUpdate( - async, - ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")) - .SelectMany(c => c.Orders.Where(o => o.OrderDate.Value.Year == 1997)), - e => e, - s => s.SetProperty(c => c.OrderDate, c => null), - rowsAffectedCount: 35, - (b, a) => Assert.All(a, c => Assert.Null(c.OrderDate))); + => AssertUpdate( + async, + ss => ss.Set().Where(c => c.CustomerID.StartsWith("F")) + .SelectMany(c => c.Orders.Where(o => o.OrderDate.Value.Year == 1997)), + e => e, + s => s.SetProperty(c => c.OrderDate, c => null), + rowsAffectedCount: 35, + (b, a) => Assert.All(a, c => Assert.Null(c.OrderDate))); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Update_Where_Join_set_property_from_joined_single_result_table(bool async) - => AssertUpdate( - async, - ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) - select new { c, LastOrder = c.Orders.OrderByDescending(o => o.OrderDate).FirstOrDefault() }, - e => e.c, - s => s.SetProperty(c => c.c.City, c => c.LastOrder.OrderDate.Value.Year.ToString()), - rowsAffectedCount: 8, - (b, a) => Assert.All(a, c => - { - if (c.CustomerID == "FISSA") - { - Assert.Null(c.City); - } - else - { - Assert.NotNull(c.City); - } - })); + => AssertUpdate( + async, + ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) + select new { c, LastOrder = c.Orders.OrderByDescending(o => o.OrderDate).FirstOrDefault() }, + e => e.c, + s => s.SetProperty(c => c.c.City, c => c.LastOrder.OrderDate.Value.Year.ToString()), + rowsAffectedCount: 8, + (b, a) => Assert.All( + a, c => + { + if (c.CustomerID == "FISSA") + { + Assert.Null(c.City); + } + else + { + Assert.NotNull(c.City); + } + })); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Update_Where_Join_set_property_from_joined_table(bool async) - => AssertUpdate( - async, - ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) - from c2 in ss.Set().Where(c => c.CustomerID == "ALFKI") - select new { c, c2 }, - e => e.c, - s => s.SetProperty(c => c.c.City, c => c.c2.City), - rowsAffectedCount: 8, - (b, a) => Assert.All(a, c => Assert.NotNull(c.City))); + => AssertUpdate( + async, + ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) + from c2 in ss.Set().Where(c => c.CustomerID == "ALFKI") + select new { c, c2 }, + e => e.c, + s => s.SetProperty(c => c.c.City, c => c.c2.City), + rowsAffectedCount: 8, + (b, a) => Assert.All(a, c => Assert.NotNull(c.City))); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Update_Where_Join_set_property_from_joined_single_result_scalar(bool async) - => AssertUpdate( - async, - ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) - select new { c, LastOrderDate = c.Orders.OrderByDescending(o => o.OrderDate).FirstOrDefault().OrderDate.Value.Year }, - e => e.c, - s => s.SetProperty(c => c.c.City, c => c.LastOrderDate.ToString()), - rowsAffectedCount: 8, - (b, a) => Assert.All(a, c => - { - if (c.CustomerID == "FISSA") - { - Assert.Null(c.City); - } - else - { - Assert.NotNull(c.City); - } - })); + => AssertUpdate( + async, + ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("F")) + select new { c, LastOrderDate = c.Orders.OrderByDescending(o => o.OrderDate).FirstOrDefault().OrderDate.Value.Year }, + e => e.c, + s => s.SetProperty(c => c.c.City, c => c.LastOrderDate.ToString()), + rowsAffectedCount: 8, + (b, a) => Assert.All( + a, c => + { + if (c.CustomerID == "FISSA") + { + Assert.Null(c.City); + } + else + { + Assert.NotNull(c.City); + } + })); protected string NormalizeDelimitersInRawString(string sql) => Fixture.TestStore.NormalizeDelimitersInRawString(sql); diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesTestBase.cs index bf4c657b7ec..e585a687079 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesTestBase.cs @@ -12,7 +12,8 @@ protected TPCFiltersInheritanceBulkUpdatesTestBase(TFixture fixture) } // Keyless entities are mapped as TPH only - public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Delete_where_hierarchy(bool async) => AssertTranslationFailed( @@ -30,7 +31,8 @@ public override Task Delete_GroupBy_Where_Select_First_3(bool async) () => base.Delete_GroupBy_Where_Select_First_3(async)); // Keyless entities are mapped as TPH only - public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Update_where_hierarchy(bool async) => AssertTranslationFailed( diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesFixture.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesFixture.cs index c95ec30de61..87ebb3e9ede 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesFixture.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesFixture.cs @@ -7,7 +7,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public abstract class TPCInheritanceBulkUpdatesFixture : InheritanceBulkUpdatesFixtureBase { - protected override string StoreName => "TPCInheritanceBulkUpdatesTest"; + protected override string StoreName + => "TPCInheritanceBulkUpdatesTest"; public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesTestBase.cs index f1d2a57c877..cfa978ebd86 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPCInheritanceBulkUpdatesTestBase.cs @@ -12,7 +12,8 @@ protected TPCInheritanceBulkUpdatesTestBase(TFixture fixture) } // Keyless entities are mapped as TPH only - public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Delete_where_hierarchy(bool async) => AssertTranslationFailed( @@ -30,7 +31,8 @@ public override Task Delete_GroupBy_Where_Select_First_3(bool async) () => base.Delete_GroupBy_Where_Select_First_3(async)); // Keyless entities are mapped as TPH only - public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Update_where_hierarchy(bool async) => AssertTranslationFailed( diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesTestBase.cs index 0d4cc7d378b..c930587aadb 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesTestBase.cs @@ -12,7 +12,8 @@ protected TPTFiltersInheritanceBulkUpdatesTestBase(TFixture fixture) } // Keyless entities are mapped as TPH only - public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Delete_where_hierarchy(bool async) => AssertTranslationFailed( @@ -35,7 +36,8 @@ public override Task Delete_GroupBy_Where_Select_First_3(bool async) () => base.Delete_GroupBy_Where_Select_First_3(async)); // Keyless entities are mapped as TPH only - public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Update_where_hierarchy(bool async) => AssertTranslationFailed( diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesFixture.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesFixture.cs index c61b3f333a6..97380f2ec8b 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesFixture.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesFixture.cs @@ -7,7 +7,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public abstract class TPTInheritanceBulkUpdatesFixture : InheritanceBulkUpdatesFixtureBase { - protected override string StoreName => "TPTInheritanceBulkUpdatesTest"; + protected override string StoreName + => "TPTInheritanceBulkUpdatesTest"; public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; diff --git a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesTestBase.cs b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesTestBase.cs index 7c6b53d8ca1..a3f21b1faed 100644 --- a/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/BulkUpdates/TPTInheritanceBulkUpdatesTestBase.cs @@ -12,7 +12,8 @@ protected TPTInheritanceBulkUpdatesTestBase(TFixture fixture) } // Keyless entities are mapped as TPH only - public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Delete_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Delete_where_hierarchy(bool async) => AssertTranslationFailed( @@ -36,18 +37,15 @@ public override Task Delete_GroupBy_Where_Select_First_3(bool async) [ConditionalTheory(Skip = "FK constraint issue")] public override Task Delete_where_using_hierarchy(bool async) - { - return base.Delete_where_using_hierarchy(async); - } + => base.Delete_where_using_hierarchy(async); [ConditionalTheory(Skip = "FK constraint issue")] public override Task Delete_where_using_hierarchy_derived(bool async) - { - return base.Delete_where_using_hierarchy_derived(async); - } + => base.Delete_where_using_hierarchy_derived(async); // Keyless entities are mapped as TPH only - public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) => Task.CompletedTask; + public override Task Update_where_keyless_entity_mapped_to_sql_query(bool async) + => Task.CompletedTask; public override Task Update_where_hierarchy(bool async) => AssertTranslationFailed( diff --git a/test/EFCore.Relational.Specification.Tests/CommandInterceptionTestBase.cs b/test/EFCore.Relational.Specification.Tests/CommandInterceptionTestBase.cs index 8111507ebaa..619d19d0ce3 100644 --- a/test/EFCore.Relational.Specification.Tests/CommandInterceptionTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/CommandInterceptionTestBase.cs @@ -1781,7 +1781,11 @@ public override IEnumerator GetEnumerator() => throw new NotImplementedException(); } - protected static void AssertNormalOutcome(DbContext context, CommandInterceptorBase interceptor, bool async, CommandSource commandSource) + protected static void AssertNormalOutcome( + DbContext context, + CommandInterceptorBase interceptor, + bool async, + CommandSource commandSource) { Assert.Equal(async, interceptor.AsyncCalled); Assert.NotEqual(async, interceptor.SyncCalled); @@ -2096,7 +2100,7 @@ public virtual ValueTask DataReaderClosingAsync( Assert.Equal(CommandId, eventData.CommandId); Assert.Equal(ConnectionId, eventData.ConnectionId); - return new(result); + return new ValueTask(result); } public virtual InterceptionResult DataReaderDisposing( diff --git a/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorDisabledRelationalTestBase.cs b/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorDisabledRelationalTestBase.cs index fc59d376cf1..bcbaedc37ae 100644 --- a/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorDisabledRelationalTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorDisabledRelationalTestBase.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public abstract class ConcurrencyDetectorDisabledRelationalTestBase : ConcurrencyDetectorDisabledTestBase diff --git a/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorEnabledRelationalTestBase.cs b/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorEnabledRelationalTestBase.cs index ab4cba0f02f..d435e30fa49 100644 --- a/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorEnabledRelationalTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorEnabledRelationalTestBase.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public abstract class ConcurrencyDetectorEnabledRelationalTestBase : ConcurrencyDetectorEnabledTestBase diff --git a/test/EFCore.Relational.Specification.Tests/ConnectionInterceptionTestBase.cs b/test/EFCore.Relational.Specification.Tests/ConnectionInterceptionTestBase.cs index ca53ff8619b..b92872862b2 100644 --- a/test/EFCore.Relational.Specification.Tests/ConnectionInterceptionTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/ConnectionInterceptionTestBase.cs @@ -600,14 +600,20 @@ public override DbConnection ConnectionCreated(ConnectionCreatedEventData eventD protected class ConnectionCreationNoDisposeInterceptor : ConnectionCreationInterceptor { - public override InterceptionResult ConnectionDisposing(DbConnection connection, ConnectionEventData eventData, InterceptionResult result) + public override InterceptionResult ConnectionDisposing( + DbConnection connection, + ConnectionEventData eventData, + InterceptionResult result) { base.ConnectionDisposing(connection, eventData, result); return InterceptionResult.Suppress(); } - public override async ValueTask ConnectionDisposingAsync(DbConnection connection, ConnectionEventData eventData, InterceptionResult result) + public override async ValueTask ConnectionDisposingAsync( + DbConnection connection, + ConnectionEventData eventData, + InterceptionResult result) { await base.ConnectionDisposingAsync(connection, eventData, result); diff --git a/test/EFCore.Relational.Specification.Tests/EntitySplittingTestBase.cs b/test/EFCore.Relational.Specification.Tests/EntitySplittingTestBase.cs index 3cb84e24c1d..ca6458f53f1 100644 --- a/test/EFCore.Relational.Specification.Tests/EntitySplittingTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/EntitySplittingTestBase.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public abstract class EntitySplittingTestBase : NonSharedModelTestBase @@ -111,8 +112,7 @@ protected void AssertSql(params string[] expected) => TestSqlLoggerFactory.AssertBaseline(expected); protected virtual void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.Entity( + => modelBuilder.Entity( ob => { ob.ToTable("MeterReadings"); @@ -123,7 +123,6 @@ protected virtual void OnModelCreating(ModelBuilder modelBuilder) t.Property(o => o.CurrentRead); }); }); - } protected async Task InitializeAsync( Action onModelCreating, diff --git a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsInfrastructureTestBase.cs b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsInfrastructureTestBase.cs index d22ed224728..9887af67645 100644 --- a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsInfrastructureTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsInfrastructureTestBase.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Migrations; public abstract class MigrationsInfrastructureTestBase : IClassFixture diff --git a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs index 70d487b5021..def0df2543a 100644 --- a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs @@ -704,12 +704,12 @@ public virtual void DefaultValue_with_line_breaks_2(bool isUnicode) .Join(""); Generate( - new CreateTableOperation + new CreateTableOperation + { + Name = "TestLineBreaks", + Schema = "dbo", + Columns = { - Name = "TestLineBreaks", - Schema = "dbo", - Columns = - { new AddColumnOperation { Name = "TestDefaultValue", @@ -719,8 +719,8 @@ public virtual void DefaultValue_with_line_breaks_2(bool isUnicode) DefaultValue = defaultValue, IsUnicode = isUnicode } - } - }); + } + }); } private static void CreateGotModel(ModelBuilder b) diff --git a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsTestBase.cs b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsTestBase.cs index 42aee11f319..d38cf50a390 100644 --- a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsTestBase.cs @@ -62,7 +62,8 @@ await Test( builder => builder.Entity( "People", e => { - e.ToTable("People", "dbo2", tb => + e.ToTable( + "People", "dbo2", tb => { tb.HasCheckConstraint("CK_People_EmployerId", $"{DelimitIdentifier("EmployerId")} > 0"); tb.HasComment("Table comment"); @@ -698,11 +699,7 @@ public virtual Task Alter_column_make_required_with_null_data() { e.Property("Id"); e.Property("SomeColumn"); - e.HasData(new Dictionary - { - { "Id", 1 }, - { "SomeColumn", null } - }); + e.HasData(new Dictionary { { "Id", 1 }, { "SomeColumn", null } }); }), builder => { }, builder => builder.Entity("People").Property("SomeColumn").IsRequired(), @@ -1521,8 +1518,8 @@ public virtual Task Add_check_constraint_with_name() e.Property("DriverLicense"); }), builder => { }, - builder => builder.Entity("People") - .ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 0")), + builder => builder.Entity("People") + .ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 0")), model => { // TODO: no scaffolding support for check constraints, https://github.com/aspnet/EntityFrameworkCore/issues/15408 @@ -1537,8 +1534,10 @@ public virtual Task Alter_check_constraint() e.Property("Id"); e.Property("DriverLicense"); }), - builder => builder.Entity("People").ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 0")), - builder => builder.Entity("People").ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 1")), + builder => builder.Entity("People") + .ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 0")), + builder => builder.Entity("People") + .ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 1")), model => { // TODO: no scaffolding support for check constraints, https://github.com/aspnet/EntityFrameworkCore/issues/15408 @@ -1553,7 +1552,8 @@ public virtual Task Drop_check_constraint() e.Property("Id"); e.Property("DriverLicense"); }), - builder => builder.Entity("People").ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 0")), + builder => builder.Entity("People") + .ToTable(tb => tb.HasCheckConstraint("CK_People_Foo", $"{DelimitIdentifier("DriverLicense")} > 0")), builder => { }, model => { diff --git a/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryFixtureBase.cs index 4992f74bead..a4547c9a481 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryFixtureBase.cs @@ -7,17 +7,14 @@ namespace Microsoft.EntityFrameworkCore.Query; public abstract class EntitySplittingQueryFixtureBase : SharedStoreFixtureBase, IQueryFixtureBase { - protected EntitySplittingQueryFixtureBase() - { - } - protected override string StoreName => "EntitySplittingQueryTest"; public TestSqlLoggerFactory TestSqlLoggerFactory - => (TestSqlLoggerFactory)ListLoggerFactory; + => (TestSqlLoggerFactory)ListLoggerFactory; - public Func GetContextCreator() => () => CreateContext(); + public Func GetContextCreator() + => () => CreateContext(); public IReadOnlyDictionary EntityAsserters { get; } = new Dictionary> { @@ -48,19 +45,22 @@ public ISetSource GetExpectedData() protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { - modelBuilder.Entity(b => - { - b.ToTable("SplitEntityOneMain", tb => + modelBuilder.Entity( + b => { - tb.Property(e => e.SharedValue); - }); + b.ToTable( + "SplitEntityOneMain", tb => + { + tb.Property(e => e.SharedValue); + }); - b.SplitToTable("SplitEntityOneOther", tb => - { - tb.Property(e => e.SharedValue).HasColumnName("OtherSharedValue"); - tb.Property(e => e.SplitValue); + b.SplitToTable( + "SplitEntityOneOther", tb => + { + tb.Property(e => e.SharedValue).HasColumnName("OtherSharedValue"); + tb.Property(e => e.SplitValue); + }); }); - }); base.OnModelCreating(modelBuilder, context); } diff --git a/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryTestBase.cs index 5e9ac7f0d98..fdbf38a829d 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/EntitySplittingQueryTestBase.cs @@ -16,18 +16,20 @@ public EntitySplittingQueryTestBase(TFixture fixture) [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Can_query_entity_which_is_split(bool async) - { - return AssertQuery( + => AssertQuery( async, ss => ss.Set()); - } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Can_query_entity_which_is_split_selecting_only_main_properties(bool async) - { - return AssertQuery( + => AssertQuery( async, - ss => ss.Set().Select(e => new { e.Id, e.SharedValue, e.Value })); - } + ss => ss.Set().Select( + e => new + { + e.Id, + e.SharedValue, + e.Value + })); } diff --git a/test/EFCore.Relational.Specification.Tests/Query/FromSqlQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/FromSqlQueryTestBase.cs index 97ab63e94a2..e9d6dc19303 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/FromSqlQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/FromSqlQueryTestBase.cs @@ -1645,7 +1645,7 @@ public virtual async Task Multiple_occurrences_of_FromSql_with_db_parameter_adds var city = "Seattle"; var fromSqlQuery = context.Customers.FromSqlRaw( NormalizeDelimitersInRawString(@"SELECT * FROM [Customers] WHERE [City] = {0}"), - CreateDbParameter("city", city)); + CreateDbParameter("city", city)); var query = fromSqlQuery.Intersect(fromSqlQuery); diff --git a/test/EFCore.Relational.Specification.Tests/Query/GearsOfWarQueryRelationalTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/GearsOfWarQueryRelationalTestBase.cs index 7884025819f..360f58481fb 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/GearsOfWarQueryRelationalTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/GearsOfWarQueryRelationalTestBase.cs @@ -114,12 +114,14 @@ await AssertQuery( } public override async Task Projecting_correlated_collection_followed_by_Distinct(bool async) - => Assert.Equal(RelationalStrings.DistinctOnCollectionNotSupported, + => Assert.Equal( + RelationalStrings.DistinctOnCollectionNotSupported, (await Assert.ThrowsAsync( () => base.Projecting_correlated_collection_followed_by_Distinct(async))).Message); public override async Task Projecting_some_properties_as_well_as_correlated_collection_followed_by_Distinct(bool async) - => Assert.Equal(RelationalStrings.DistinctOnCollectionNotSupported, + => Assert.Equal( + RelationalStrings.DistinctOnCollectionNotSupported, (await Assert.ThrowsAsync( () => base.Projecting_some_properties_as_well_as_correlated_collection_followed_by_Distinct(async))).Message); @@ -136,12 +138,10 @@ public override async Task Projecting_entity_as_well_as_complex_correlated_colle () => base.Projecting_entity_as_well_as_complex_correlated_collection_followed_by_Distinct(async))).Message); public override async Task Projecting_entity_as_well_as_correlated_collection_of_scalars_followed_by_Distinct(bool async) - { - Assert.Equal( + => Assert.Equal( RelationalStrings.DistinctOnCollectionNotSupported, (await Assert.ThrowsAsync( () => base.Projecting_entity_as_well_as_correlated_collection_of_scalars_followed_by_Distinct(async))).Message); - } public override async Task Correlated_collection_with_distinct_3_levels(bool async) => Assert.Equal( diff --git a/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs index c64f19a9e53..bfefb656232 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs @@ -162,7 +162,7 @@ public virtual ISetSource GetExpectedData() } }, { - typeof( JsonOwnedCustomNameRoot), (e, a) => + typeof(JsonOwnedCustomNameRoot), (e, a) => { if (a != null) { @@ -307,9 +307,7 @@ private static void AssertOwnedBranch(JsonOwnedBranch expected, JsonOwnedBranch } private static void AssertOwnedLeaf(JsonOwnedLeaf expected, JsonOwnedLeaf actual) - { - Assert.Equal(expected.SomethingSomething, actual.SomethingSomething); - } + => Assert.Equal(expected.SomethingSomething, actual.SomethingSomething); public static void AssertCustomNameRoot(JsonOwnedCustomNameRoot expected, JsonOwnedCustomNameRoot actual) { @@ -372,121 +370,138 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity().OwnsOne(x => x.OwnedReferenceRoot, b => - { - b.ToJson(); - b.WithOwner(x => x.Owner); - - b.OwnsOne(x => x.OwnedReferenceBranch, bb => + modelBuilder.Entity().OwnsOne( + x => x.OwnedReferenceRoot, b => { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); - bb.Navigation(x => x.OwnedReferenceLeaf).IsRequired(); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - }); + b.ToJson(); + b.WithOwner(x => x.Owner); - b.OwnsMany(x => x.OwnedCollectionBranch, bb => - { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); + b.OwnsOne( + x => x.OwnedReferenceBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); + bb.Navigation(x => x.OwnedReferenceLeaf).IsRequired(); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + }); + + b.OwnsMany( + x => x.OwnedCollectionBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); + }); }); - }); modelBuilder.Entity().Navigation(x => x.OwnedReferenceRoot).IsRequired(); - modelBuilder.Entity().OwnsMany(x => x.OwnedCollectionRoot, b => - { - b.OwnsOne(x => x.OwnedReferenceBranch, bb => + modelBuilder.Entity().OwnsMany( + x => x.OwnedCollectionRoot, b => { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); - }); + b.OwnsOne( + x => x.OwnedReferenceBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); + }); - b.OwnsMany(x => x.OwnedCollectionBranch, bb => - { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); - bb.OwnsMany(x => x.OwnedCollectionLeaf); + b.OwnsMany( + x => x.OwnedCollectionBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + }); + b.ToJson(); }); - b.ToJson(); - }); modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity().OwnsOne(x => x.OwnedReferenceRoot, b => - { - b.Property(x => x.Enum).HasConversion(); - b.OwnsOne(x => x.OwnedReferenceBranch); - b.OwnsMany(x => x.OwnedCollectionBranch); - b.ToJson("json_reference_custom_naming"); - }); + modelBuilder.Entity().OwnsOne( + x => x.OwnedReferenceRoot, b => + { + b.Property(x => x.Enum).HasConversion(); + b.OwnsOne(x => x.OwnedReferenceBranch); + b.OwnsMany(x => x.OwnedCollectionBranch); + b.ToJson("json_reference_custom_naming"); + }); - modelBuilder.Entity().OwnsMany(x => x.OwnedCollectionRoot, b => - { - b.ToJson("json_collection_custom_naming"); - b.Property(x => x.Enum).HasConversion(); - b.OwnsOne(x => x.OwnedReferenceBranch); - b.OwnsMany(x => x.OwnedCollectionBranch); - }); + modelBuilder.Entity().OwnsMany( + x => x.OwnedCollectionRoot, b => + { + b.ToJson("json_collection_custom_naming"); + b.Property(x => x.Enum).HasConversion(); + b.OwnsOne(x => x.OwnedReferenceBranch); + b.OwnsMany(x => x.OwnedCollectionBranch); + }); modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity().OwnsMany(x => x.OwnedCollection, b => + modelBuilder.Entity().OwnsMany( + x => x.OwnedCollection, b => { b.ToJson(); b.Ignore(x => x.Parent); }); modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.ReferenceOnBase, bb => + modelBuilder.Entity( + b => { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); + b.OwnsOne( + x => x.ReferenceOnBase, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); + + b.OwnsMany( + x => x.CollectionOnBase, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); }); - b.OwnsMany(x => x.CollectionOnBase, bb => + modelBuilder.Entity( + b => { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); + b.HasBaseType(); + b.OwnsOne( + x => x.ReferenceOnDerived, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); + + b.OwnsMany( + x => x.CollectionOnDerived, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); }); - }); - modelBuilder.Entity(b => - { - b.HasBaseType(); - b.OwnsOne(x => x.ReferenceOnDerived, bb => + modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); + modelBuilder.Entity().OwnsOne( + x => x.Reference, b => { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); + b.ToJson(); + b.Property(x => x.TestDecimal).HasPrecision(18, 3); }); - - b.OwnsMany(x => x.CollectionOnDerived, bb => + modelBuilder.Entity().OwnsMany( + x => x.Collection, b => { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); + b.ToJson(); + b.Property(x => x.TestDecimal).HasPrecision(18, 3); }); - }); - - modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity().OwnsOne(x => x.Reference, b => - { - b.ToJson(); - b.Property(x => x.TestDecimal).HasPrecision(18, 3); - }); - modelBuilder.Entity().OwnsMany(x => x.Collection, b => - { - b.ToJson(); - b.Property(x => x.TestDecimal).HasPrecision(18, 3); - }); } } diff --git a/test/EFCore.Relational.Specification.Tests/Query/JsonQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/JsonQueryTestBase.cs index 8a6e03e47ff..a29be984da2 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/JsonQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/JsonQueryTestBase.cs @@ -34,14 +34,15 @@ public virtual Task Basic_json_projection_owned_reference_duplicated(bool async) => AssertQuery( async, ss => ss.Set() - .OrderBy(x => x.Id) - .Select(x => new - { - Root1 = x.OwnedReferenceRoot, - Branch1 = x.OwnedReferenceRoot.OwnedReferenceBranch, - Root2 = x.OwnedReferenceRoot, - Branch2 = x.OwnedReferenceRoot.OwnedReferenceBranch, - }).AsNoTracking(), + .OrderBy(x => x.Id) + .Select( + x => new + { + Root1 = x.OwnedReferenceRoot, + Branch1 = x.OwnedReferenceRoot.OwnedReferenceBranch, + Root2 = x.OwnedReferenceRoot, + Branch2 = x.OwnedReferenceRoot.OwnedReferenceBranch, + }).AsNoTracking(), assertOrder: true, elementAsserter: (e, a) => { @@ -108,11 +109,11 @@ public virtual Task Json_scalar_length(bool async) public virtual Task Basic_json_projection_enum_inside_json_entity(bool async) => AssertQuery( async, - ss => ss.Set().Select(x => new - { - x.Id, - Enum = x.OwnedReferenceRoot.OwnedReferenceBranch.Enum, - }), + ss => ss.Set().Select( + x => new + { + x.Id, x.OwnedReferenceRoot.OwnedReferenceBranch.Enum, + }), elementSorter: e => e.Id, elementAsserter: (e, a) => { @@ -125,11 +126,11 @@ public virtual Task Basic_json_projection_enum_inside_json_entity(bool async) public virtual Task Json_projection_enum_with_custom_conversion(bool async) => AssertQuery( async, - ss => ss.Set().Select(x => new - { - x.Id, - Enum = x.OwnedReferenceRoot.Enum, - }), + ss => ss.Set().Select( + x => new + { + x.Id, x.OwnedReferenceRoot.Enum, + }), elementSorter: e => e.Id, elementAsserter: (e, a) => { @@ -142,15 +143,16 @@ public virtual Task Json_projection_enum_with_custom_conversion(bool async) public virtual Task Json_projection_with_deduplication(bool async) => AssertQuery( async, - ss => ss.Set().Select(x => new - { - x, - x.OwnedReferenceRoot.OwnedReferenceBranch, - x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf, - x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf, - x.OwnedReferenceRoot.OwnedCollectionBranch, - x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething - }), + ss => ss.Set().Select( + x => new + { + x, + x.OwnedReferenceRoot.OwnedReferenceBranch, + x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf, + x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf, + x.OwnedReferenceRoot.OwnedCollectionBranch, + x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething + }), elementAsserter: (e, a) => { AssertEqual(e.OwnedReferenceBranch, a.OwnedReferenceBranch); @@ -161,18 +163,19 @@ public virtual Task Json_projection_with_deduplication(bool async) }, entryCount: 40); - [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Json_projection_with_deduplication_reverse_order(bool async) => AssertQuery( async, - ss => ss.Set().Select(x => new - { - x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf, - x.OwnedReferenceRoot, - x - }).AsNoTracking(), + ss => ss.Set() + .Select( + x => new + { + x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf, + x.OwnedReferenceRoot, + x + }).AsNoTracking(), elementAsserter: (e, a) => { AssertEqual(e.OwnedReferenceLeaf, a.OwnedReferenceLeaf); @@ -219,7 +222,12 @@ public virtual Task Json_subquery_reference_pushdown_reference_anonymous_project async, ss => ss.Set() .OrderBy(x => x.Id) - .Select(x => new { Entity = x.OwnedReferenceRoot, Scalar = x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething }) + .Select( + x => new + { + Entity = x.OwnedReferenceRoot, + Scalar = x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething + }) .Take(10) .Distinct() .Select(x => new { x.Entity.OwnedReferenceBranch, x.Scalar.Length }).AsNoTracking(), @@ -237,15 +245,26 @@ public virtual Task Json_subquery_reference_pushdown_reference_pushdown_anonymou async, ss => ss.Set() .OrderBy(x => x.Id) - .Select(x => new { Root = x.OwnedReferenceRoot, Scalar = x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething }) + .Select( + x => new + { + Root = x.OwnedReferenceRoot, + Scalar = x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething + }) .Take(10) .Distinct() .Select(x => new { Branch = x.Root.OwnedReferenceBranch, x.Scalar.Length }) .OrderBy(x => x.Length) .Take(10) .Distinct() - .Select(x => new { x.Branch.OwnedReferenceLeaf, x.Branch.OwnedCollectionLeaf, x.Length }) - .AsNoTracking(), + .Select( + x => new + { + x.Branch.OwnedReferenceLeaf, + x.Branch.OwnedCollectionLeaf, + x.Length + }) + .AsNoTracking(), elementSorter: e => (e.OwnedReferenceLeaf.SomethingSomething, e.OwnedCollectionLeaf.Count, e.Length), elementAsserter: (e, a) => { @@ -335,16 +354,17 @@ public virtual Task Custom_naming_projection_owned_scalar(bool async) public virtual Task Custom_naming_projection_everything(bool async) => AssertQuery( async, - ss => ss.Set().Select(x => new - { - root = x, - referece = x.OwnedReferenceRoot, - nested_reference = x.OwnedReferenceRoot.OwnedReferenceBranch, - collection = x.OwnedCollectionRoot, - nested_collection = x.OwnedReferenceRoot.OwnedCollectionBranch, - scalar = x.OwnedReferenceRoot.Name, - nested_scalar = x.OwnedReferenceRoot.OwnedReferenceBranch.Fraction, - }), + ss => ss.Set().Select( + x => new + { + root = x, + referece = x.OwnedReferenceRoot, + nested_reference = x.OwnedReferenceRoot.OwnedReferenceBranch, + collection = x.OwnedCollectionRoot, + nested_collection = x.OwnedReferenceRoot.OwnedCollectionBranch, + scalar = x.OwnedReferenceRoot.Name, + nested_scalar = x.OwnedReferenceRoot.OwnedReferenceBranch.Fraction, + }), elementSorter: e => e.root.Id, elementAsserter: (e, a) => { @@ -420,12 +440,13 @@ public virtual Task Project_json_entity_FirstOrDefault_subquery(bool async) => AssertQuery( async, ss => ss.Set() - .OrderBy(x => x.Id) - .Select(x => ss.Set() - .OrderBy(xx => xx.Id) - .Select(xx => xx.OwnedReferenceRoot) - .FirstOrDefault().OwnedReferenceBranch) - .AsNoTracking()); + .OrderBy(x => x.Id) + .Select( + x => ss.Set() + .OrderBy(xx => xx.Id) + .Select(xx => xx.OwnedReferenceRoot) + .FirstOrDefault().OwnedReferenceBranch) + .AsNoTracking()); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -433,11 +454,12 @@ public virtual Task Project_json_entity_FirstOrDefault_subquery_with_binding_on_ => AssertQueryScalar( async, ss => ss.Set() - .OrderBy(x => x.Id) - .Select(x => ss.Set() - .OrderBy(xx => xx.Id) - .Select(xx => xx.OwnedReferenceRoot) - .FirstOrDefault().OwnedReferenceBranch.Date)); + .OrderBy(x => x.Id) + .Select( + x => ss.Set() + .OrderBy(xx => xx.Id) + .Select(xx => xx.OwnedReferenceRoot) + .FirstOrDefault().OwnedReferenceBranch.Date)); [ConditionalTheory(Skip = "issue #28733")] [MemberData(nameof(IsAsyncData))] @@ -445,16 +467,19 @@ public virtual Task Project_json_entity_FirstOrDefault_subquery_with_entity_comp => AssertQueryScalar( async, ss => ss.Set() - .OrderBy(x => x.Id) - .Select(x => ss.Set() - .OrderBy(xx => xx.Id) - .Select(xx => xx.OwnedReferenceRoot) - .FirstOrDefault().OwnedReferenceBranch == ss.Set() - .OrderByDescending(x => x.Id) - .Select(x => ss.Set() - .OrderBy(xx => xx.Id) - .Select(xx => xx.OwnedReferenceRoot) - .FirstOrDefault().OwnedReferenceBranch))); + .OrderBy(x => x.Id) + .Select( + x => ss.Set() + .OrderBy(xx => xx.Id) + .Select(xx => xx.OwnedReferenceRoot) + .FirstOrDefault().OwnedReferenceBranch + == ss.Set() + .OrderByDescending(x => x.Id) + .Select( + x => ss.Set() + .OrderBy(xx => xx.Id) + .Select(xx => xx.OwnedReferenceRoot) + .FirstOrDefault().OwnedReferenceBranch))); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -463,16 +488,18 @@ public virtual Task Project_json_entity_FirstOrDefault_subquery_deduplication(bo async, ss => ss.Set() .OrderBy(x => x.Id) - .Select(x => ss.Set() - .OrderBy(xx => xx.Id) - .Select(xx => new - { - x.OwnedReferenceRoot.OwnedCollectionBranch, - xx.OwnedReferenceRoot, - xx.OwnedReferenceRoot.OwnedReferenceBranch, - xx.OwnedReferenceRoot.Name, - x.OwnedReferenceRoot.OwnedReferenceBranch.Enum - }).FirstOrDefault()).AsNoTracking(), + .Select( + x => ss.Set() + .OrderBy(xx => xx.Id) + .Select( + xx => new + { + x.OwnedReferenceRoot.OwnedCollectionBranch, + xx.OwnedReferenceRoot, + xx.OwnedReferenceRoot.OwnedReferenceBranch, + xx.OwnedReferenceRoot.Name, + x.OwnedReferenceRoot.OwnedReferenceBranch.Enum + }).FirstOrDefault()).AsNoTracking(), assertOrder: true, elementAsserter: (e, a) => { @@ -488,16 +515,18 @@ public virtual Task Project_json_entity_FirstOrDefault_subquery_deduplication_an async, ss => ss.Set() .OrderBy(x => x.Id) - .Select(x => ss.Set() - .OrderBy(xx => xx.Id) - .Select(xx => new - { - x.OwnedReferenceRoot.OwnedCollectionBranch, - xx.OwnedReferenceRoot, - xx.OwnedReferenceRoot.OwnedReferenceBranch, - xx.OwnedReferenceRoot.Name, - x.OwnedReferenceRoot.OwnedReferenceBranch.Enum - }).FirstOrDefault()).AsNoTracking(), + .Select( + x => ss.Set() + .OrderBy(xx => xx.Id) + .Select( + xx => new + { + x.OwnedReferenceRoot.OwnedCollectionBranch, + xx.OwnedReferenceRoot, + xx.OwnedReferenceRoot.OwnedReferenceBranch, + xx.OwnedReferenceRoot.Name, + x.OwnedReferenceRoot.OwnedReferenceBranch.Enum + }).FirstOrDefault()).AsNoTracking(), assertOrder: true, elementAsserter: (e, a) => { @@ -515,16 +544,18 @@ public virtual Task Project_json_entity_FirstOrDefault_subquery_deduplication_ou async, ss => ss.Set() .OrderBy(x => x.Id) - .Select(x => ss.Set() - .OrderBy(xx => xx.Id) - .Select(xx => new - { - x.OwnedReferenceRoot.OwnedCollectionBranch, - xx.OwnedReferenceRoot, - xx.OwnedReferenceRoot.OwnedReferenceBranch, - xx.OwnedReferenceRoot.Name, - x.OwnedReferenceRoot.OwnedReferenceBranch.Enum - }).FirstOrDefault().OwnedCollectionBranch).AsNoTracking(), + .Select( + x => ss.Set() + .OrderBy(xx => xx.Id) + .Select( + xx => new + { + x.OwnedReferenceRoot.OwnedCollectionBranch, + xx.OwnedReferenceRoot, + xx.OwnedReferenceRoot.OwnedReferenceBranch, + xx.OwnedReferenceRoot.Name, + x.OwnedReferenceRoot.OwnedReferenceBranch.Enum + }).FirstOrDefault().OwnedCollectionBranch).AsNoTracking(), assertOrder: true, elementAsserter: (e, a) => AssertCollection(e, a, ordered: true)); @@ -549,12 +580,13 @@ public virtual Task Json_entity_with_inheritance_project_derived(bool async) public virtual Task Json_entity_with_inheritance_project_navigations(bool async) => AssertQuery( async, - ss => ss.Set().Select(x => new - { - x.Id, - x.ReferenceOnBase, - x.CollectionOnBase - }).AsNoTracking(), + ss => ss.Set().Select( + x => new + { + x.Id, + x.ReferenceOnBase, + x.CollectionOnBase + }).AsNoTracking(), elementSorter: e => e.Id, elementAsserter: (e, a) => { @@ -568,14 +600,15 @@ public virtual Task Json_entity_with_inheritance_project_navigations(bool async) public virtual Task Json_entity_with_inheritance_project_navigations_on_derived(bool async) => AssertQuery( async, - ss => ss.Set().OfType().Select(x => new - { - x, - x.ReferenceOnBase, - x.ReferenceOnDerived, - x.CollectionOnBase, - x.CollectionOnDerived - }), + ss => ss.Set().OfType().Select( + x => new + { + x, + x.ReferenceOnBase, + x.ReferenceOnDerived, + x.CollectionOnBase, + x.CollectionOnDerived + }), elementSorter: e => e.x.Id, elementAsserter: (e, a) => { @@ -614,8 +647,8 @@ public virtual Task Json_scalar_required_null_semantics(bool async) => AssertQuery( async, ss => ss.Set() - .Where(x => x.OwnedReferenceRoot.Number != x.OwnedReferenceRoot.Name.Length) - .Select(x => x.Name)); + .Where(x => x.OwnedReferenceRoot.Number != x.OwnedReferenceRoot.Name.Length) + .Select(x => x.Name)); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -623,8 +656,8 @@ public virtual Task Json_scalar_optional_null_semantics(bool async) => AssertQuery( async, ss => ss.Set() - .Where(x => x.OwnedReferenceRoot.Name == x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething) - .Select(x => x.Name)); + .Where(x => x.OwnedReferenceRoot.Name == x.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething) + .Select(x => x.Name)); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -632,7 +665,7 @@ public virtual Task Group_by_on_json_scalar(bool async) => AssertQuery( async, ss => ss.Set() - .GroupBy(x => x.OwnedReferenceRoot.Name).Select(x => new { x.Key, Count = x.Count() })); + .GroupBy(x => x.OwnedReferenceRoot.Name).Select(x => new { x.Key, Count = x.Count() })); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -700,24 +733,25 @@ public virtual Task Json_all_types_entity_projection(bool async) public virtual Task Json_all_types_projection_individual_properties(bool async) => AssertQuery( async, - ss => ss.Set().Select(x => new - { - x.Reference.TestBoolean, - x.Reference.TestByte, - x.Reference.TestCharacter, - x.Reference.TestDateTime, - x.Reference.TestDateTimeOffset, - x.Reference.TestDecimal, - x.Reference.TestDouble, - x.Reference.TestGuid, - x.Reference.TestInt16, - x.Reference.TestInt32, - x.Reference.TestInt64, - x.Reference.TestSignedByte, - x.Reference.TestSingle, - x.Reference.TestTimeSpan, - x.Reference.TestUnsignedInt16, - x.Reference.TestUnsignedInt32, - x.Reference.TestUnsignedInt64 - })); + ss => ss.Set().Select( + x => new + { + x.Reference.TestBoolean, + x.Reference.TestByte, + x.Reference.TestCharacter, + x.Reference.TestDateTime, + x.Reference.TestDateTimeOffset, + x.Reference.TestDecimal, + x.Reference.TestDouble, + x.Reference.TestGuid, + x.Reference.TestInt16, + x.Reference.TestInt32, + x.Reference.TestInt64, + x.Reference.TestSignedByte, + x.Reference.TestSingle, + x.Reference.TestTimeSpan, + x.Reference.TestUnsignedInt16, + x.Reference.TestUnsignedInt32, + x.Reference.TestUnsignedInt64 + })); } diff --git a/test/EFCore.Relational.Specification.Tests/Query/MappingQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/MappingQueryTestBase.cs index 6a450b2a549..92f2ed8d751 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/MappingQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/MappingQueryTestBase.cs @@ -89,6 +89,7 @@ protected enum ShipVia public abstract class MappingQueryFixtureBase : SharedStoreFixtureBase { protected abstract string DatabaseSchema { get; } + protected override string StoreName => "Northwind"; diff --git a/test/EFCore.Relational.Specification.Tests/Query/NorthwindSqlQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/NorthwindSqlQueryTestBase.cs index a195aa6d84b..39ecd3f0a29 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/NorthwindSqlQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/NorthwindSqlQueryTestBase.cs @@ -17,6 +17,7 @@ protected NorthwindSqlQueryTestBase(TFixture fixture) Fixture = fixture; Fixture.TestSqlLoggerFactory.Clear(); } + protected TFixture Fixture { get; } public static IEnumerable IsAsyncData = new[] { new object[] { false }, new object[] { true } }; @@ -41,9 +42,10 @@ public virtual async Task SqlQuery_composed_Contains(bool async) { using var context = CreateContext(); var query = context.Set() - .Where(e => context.Database - .SqlQuery(NormalizeDelimitersInInterpolatedString(@$"SELECT [ProductID] AS [Value] FROM [Products]")) - .Contains(e.OrderID)); + .Where( + e => context.Database + .SqlQuery(NormalizeDelimitersInInterpolatedString(@$"SELECT [ProductID] AS [Value] FROM [Products]")) + .Contains(e.OrderID)); var result = async ? await query.ToListAsync() @@ -58,11 +60,11 @@ public virtual async Task SqlQuery_composed_Join(bool async) { using var context = CreateContext(); var query = from o in context.Set() - join p in context.Database.SqlQuery(NormalizeDelimitersInInterpolatedString(@$"SELECT [ProductID] AS [Value] FROM [Products]")) + join p in context.Database.SqlQuery( + NormalizeDelimitersInInterpolatedString(@$"SELECT [ProductID] AS [Value] FROM [Products]")) on o.OrderID equals p select new { o, p }; - var result = async ? await query.ToListAsync() : query.ToList(); @@ -76,7 +78,8 @@ public virtual async Task SqlQuery_over_int_with_parameter(bool async) { using var context = CreateContext(); var value = 10; - var query = context.Database.SqlQuery(NormalizeDelimitersInInterpolatedString(@$"SELECT [ProductID] FROM [Products] WHERE [ProductID] = {value}")); + var query = context.Database.SqlQuery( + NormalizeDelimitersInInterpolatedString(@$"SELECT [ProductID] FROM [Products] WHERE [ProductID] = {value}")); var result = async ? await query.ToListAsync() diff --git a/test/EFCore.Relational.Specification.Tests/Query/NullSemanticsQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/NullSemanticsQueryTestBase.cs index 84f5437438d..d3e7c2b59ad 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/NullSemanticsQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/NullSemanticsQueryTestBase.cs @@ -1531,23 +1531,23 @@ await AssertQuery( ss => ss.Set().Where(e => e.BoolB != e.NullableBoolA.HasValue)); } - [ConditionalTheory] - [MemberData(nameof(IsAsyncData))] - public virtual async Task Bool_not_equal_nullable_int_HasValue(bool async) - { - await AssertQuery( - async, - ss => ss.Set().Where(e => true != e.NullableIntA.HasValue)); - - var prm = false; - await AssertQuery( - async, - ss => ss.Set().Where(e => prm != e.NullableIntA.HasValue)); - - await AssertQuery( - async, - ss => ss.Set().Where(e => e.BoolB != e.NullableIntA.HasValue)); - } + [ConditionalTheory] + [MemberData(nameof(IsAsyncData))] + public virtual async Task Bool_not_equal_nullable_int_HasValue(bool async) + { + await AssertQuery( + async, + ss => ss.Set().Where(e => true != e.NullableIntA.HasValue)); + + var prm = false; + await AssertQuery( + async, + ss => ss.Set().Where(e => prm != e.NullableIntA.HasValue)); + + await AssertQuery( + async, + ss => ss.Set().Where(e => e.BoolB != e.NullableIntA.HasValue)); + } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] diff --git a/test/EFCore.Relational.Specification.Tests/Query/OwnedEntityQueryRelationalTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/OwnedEntityQueryRelationalTestBase.cs index 8945f7a2930..3a0cf829955 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/OwnedEntityQueryRelationalTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/OwnedEntityQueryRelationalTestBase.cs @@ -243,7 +243,8 @@ public virtual async Task Owned_entity_with_all_null_properties_materializes_whe ? await query.ToListAsync() : query.ToList(); - Assert.Collection(result, + Assert.Collection( + result, t => { Assert.Equal("Buyer1", t.Buyer); @@ -270,15 +271,14 @@ public MyContext28247(DbContextOptions options) public DbSet RotRutCases { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.Entity(b => - { - b.ToTable("RotRutCases"); + => modelBuilder.Entity( + b => + { + b.ToTable("RotRutCases"); - b.OwnsOne(e => e.Rot); - b.OwnsOne(e => e.Rut); - }); - } + b.OwnsOne(e => e.Rot); + b.OwnsOne(e => e.Rut); + }); public void Seed() { @@ -322,10 +322,8 @@ public class Rut } protected override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) - { - return base.AddOptions(builder).ConfigureWarnings( + => base.AddOptions(builder).ConfigureWarnings( c => c .Log(RelationalEventId.OptionalDependentWithoutIdentifyingPropertyWarning) .Log(RelationalEventId.OptionalDependentWithAllNullPropertiesWarning)); - } } diff --git a/test/EFCore.Relational.Specification.Tests/Query/SimpleQueryRelationalTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/SimpleQueryRelationalTestBase.cs index e0cc9149aa5..8de55d7775f 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/SimpleQueryRelationalTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/SimpleQueryRelationalTestBase.cs @@ -84,28 +84,29 @@ public Context27954(DbContextOptions options) public DbSet MyEntities { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder + => modelBuilder .HasDbFunction(typeof(MyEntity).GetMethod(nameof(MyEntity.Modify))) .HasName("ModifyDate") .HasStoreType("datetime") .HasSchema("dbo"); - } } protected class MyEntity { public int Id { get; set; } + [Column(TypeName = "datetime")] public DateTime SomeDate { get; set; } - public static DateTime Modify(DateTime date) => throw new NotSupportedException(); + + public static DateTime Modify(DateTime date) + => throw new NotSupportedException(); } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Hierarchy_query_with_abstract_type_sibling_TPC(bool async) - { - return Hierarchy_query_with_abstract_type_sibling_helper(async, + => Hierarchy_query_with_abstract_type_sibling_helper( + async, mb => { mb.Entity().UseTpcMappingStrategy(); @@ -114,13 +115,12 @@ public virtual Task Hierarchy_query_with_abstract_type_sibling_TPC(bool async) mb.Entity().ToTable("Dogs"); mb.Entity().ToTable("FarmAnimals"); }); - } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Hierarchy_query_with_abstract_type_sibling_TPT(bool async) - { - return Hierarchy_query_with_abstract_type_sibling_helper(async, + => Hierarchy_query_with_abstract_type_sibling_helper( + async, mb => { mb.Entity().UseTptMappingStrategy(); @@ -129,7 +129,6 @@ public virtual Task Hierarchy_query_with_abstract_type_sibling_TPT(bool async) mb.Entity().ToTable("Dogs"); mb.Entity().ToTable("FarmAnimals"); }); - } } } diff --git a/test/EFCore.Relational.Specification.Tests/Query/ToSqlQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/ToSqlQueryTestBase.cs index d755a6b4c25..460d0f81486 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/ToSqlQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/ToSqlQueryTestBase.cs @@ -14,27 +14,24 @@ protected override string StoreName [MemberData(nameof(IsAsyncData))] // Issue #27629 public virtual async Task Entity_type_with_navigation_mapped_to_SqlQuery(bool async) { - var contextFactory = await InitializeAsync(seed: c => - { - var author = new Author { Name = "Toast", Posts = { new() { Title = "Sausages of the world!"} } }; - c.Add(author); - c.SaveChanges(); - - var postStat = new PostStat { Count = 10, Author = author }; - author.PostStat = postStat; - c.Add(postStat); - c.SaveChanges(); - }); + var contextFactory = await InitializeAsync( + seed: c => + { + var author = new Author { Name = "Toast", Posts = { new Post { Title = "Sausages of the world!" } } }; + c.Add(author); + c.SaveChanges(); + + var postStat = new PostStat { Count = 10, Author = author }; + author.PostStat = postStat; + c.Add(postStat); + c.SaveChanges(); + }); using var context = contextFactory.CreateContext(); var authors = await (from o in context.Authors - select new - { - Author = o, - PostCount = o.PostStat!.Count - }).ToListAsync(); + select new { Author = o, PostCount = o.PostStat!.Count }).ToListAsync(); Assert.Single(authors); Assert.Equal("Toast", authors[0].Author.Name); diff --git a/test/EFCore.Relational.Specification.Tests/TPTTableSplittingTestBase.cs b/test/EFCore.Relational.Specification.Tests/TPTTableSplittingTestBase.cs index 75d0ef40563..d2288b03edf 100644 --- a/test/EFCore.Relational.Specification.Tests/TPTTableSplittingTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/TPTTableSplittingTestBase.cs @@ -22,12 +22,10 @@ public override Task ExecuteDelete_throws_for_table_sharing(bool async) => Task.CompletedTask; public override async Task ExecuteUpdate_works_for_table_sharing(bool async) - { - Assert.Contains( + => Assert.Contains( RelationalStrings.NonQueryTranslationFailedWithDetails( "", RelationalStrings.ExecuteOperationOnTPT("ExecuteUpdate", "Vehicle"))[21..], (await Assert.ThrowsAsync(() => base.ExecuteUpdate_works_for_table_sharing(async))).Message); - } protected override string StoreName => "TPTTableSplittingTest"; diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/EntitySplitting/SplitEntityData.cs b/test/EFCore.Relational.Specification.Tests/TestModels/EntitySplitting/SplitEntityData.cs index 4d4e328eb75..cd5eb38948d 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/EntitySplitting/SplitEntityData.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/EntitySplitting/SplitEntityData.cs @@ -26,10 +26,7 @@ public IQueryable Set() } private static SplitEntityOne[] CreateSplitEntityOnes() - => new SplitEntityOne[] - { - - }; + => new SplitEntityOne[] { }; public void Seed(EntitySplittingContext context) { diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/EntityBasic.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/EntityBasic.cs index a7dc51d601f..627e6b3ba68 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/EntityBasic.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/EntityBasic.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class EntityBasic { - public class EntityBasic - { - public int Id { get; set; } - public string Name { get; set; } - public List JsonEntityBasics { get; set; } - } + public int Id { get; set; } + public string Name { get; set; } + public List JsonEntityBasics { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs index 5aa5eefac16..e04f26b46a5 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntityAllTypes { - public class JsonEntityAllTypes - { - public int Id { get; set; } - public JsonOwnedAllTypes Reference { get; set; } - public List Collection { get; set; } - } + public int Id { get; set; } + public JsonOwnedAllTypes Reference { get; set; } + public List Collection { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasic.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasic.cs index ed9f2862261..0ce864ac447 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasic.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasic.cs @@ -1,17 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntityBasic { - public class JsonEntityBasic - { - public int Id { get; set; } - public string Name { get; set; } + public int Id { get; set; } + public string Name { get; set; } - public JsonOwnedRoot OwnedReferenceRoot { get; set; } - public List OwnedCollectionRoot { get; set; } + public JsonOwnedRoot OwnedReferenceRoot { get; set; } + public List OwnedCollectionRoot { get; set; } - public JsonEntityBasicForReference EntityReference { get; set; } - public List EntityCollection { get; set; } - } + public JsonEntityBasicForReference EntityReference { get; set; } + public List EntityCollection { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForCollection.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForCollection.cs index e890f897d9b..d1b4c7d1c8a 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForCollection.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForCollection.cs @@ -1,14 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntityBasicForCollection { - public class JsonEntityBasicForCollection - { - public int Id { get; set; } - public string Name { get; set; } + public int Id { get; set; } + public string Name { get; set; } - public int? ParentId { get; set; } - public JsonEntityBasic Parent { get; set; } - } + public int? ParentId { get; set; } + public JsonEntityBasic Parent { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForReference.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForReference.cs index 50da75cf0cf..c0228606e2e 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForReference.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityBasicForReference.cs @@ -1,14 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntityBasicForReference { - public class JsonEntityBasicForReference - { - public int Id { get; set; } - public string Name { get; set; } + public int Id { get; set; } + public string Name { get; set; } - public int? ParentId { get; set; } - public JsonEntityBasic Parent { get; set; } - } + public int? ParentId { get; set; } + public JsonEntityBasic Parent { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityCustomNaming.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityCustomNaming.cs index 9cc28b9a183..c0fdcc71238 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityCustomNaming.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityCustomNaming.cs @@ -3,18 +3,17 @@ using System.Text.Json.Serialization; -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntityCustomNaming { - public class JsonEntityCustomNaming - { - public int Id { get; set; } + public int Id { get; set; } - public string Title { get; set; } + public string Title { get; set; } - [JsonPropertyName("CustomOwnedReferenceRoot")] - public JsonOwnedCustomNameRoot OwnedReferenceRoot { get; set; } + [JsonPropertyName("CustomOwnedReferenceRoot")] + public JsonOwnedCustomNameRoot OwnedReferenceRoot { get; set; } - [JsonPropertyName("CustomOwnedCollectionRoot")] - public List OwnedCollectionRoot { get; set; } - } + [JsonPropertyName("CustomOwnedCollectionRoot")] + public List OwnedCollectionRoot { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceBase.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceBase.cs index a5a43432c40..29c4081a78c 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceBase.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceBase.cs @@ -1,14 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntityInheritanceBase { - public class JsonEntityInheritanceBase - { - public int Id { get; set; } - public string Name { get; set; } + public int Id { get; set; } + public string Name { get; set; } - public JsonOwnedBranch ReferenceOnBase { get; set; } - public List CollectionOnBase { get; set; } - } + public JsonOwnedBranch ReferenceOnBase { get; set; } + public List CollectionOnBase { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceDerived.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceDerived.cs index a377486e95f..18c5801a927 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceDerived.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityInheritanceDerived.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntityInheritanceDerived : JsonEntityInheritanceBase { - public class JsonEntityInheritanceDerived : JsonEntityInheritanceBase - { - public double Fraction { get; set; } - public JsonOwnedBranch ReferenceOnDerived { get; set; } - public List CollectionOnDerived { get; set; } - } + public double Fraction { get; set; } + public JsonOwnedBranch ReferenceOnDerived { get; set; } + public List CollectionOnDerived { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntitySingleOwned.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntitySingleOwned.cs index ec266b4498d..21e9e0f0cb3 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntitySingleOwned.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntitySingleOwned.cs @@ -1,13 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonEntitySingleOwned { - public class JsonEntitySingleOwned - { - public int Id { get; set; } - public string Name { get; set; } + public int Id { get; set; } + public string Name { get; set; } - public List OwnedCollection { get; set; } - } + public List OwnedCollection { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEnum.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEnum.cs index ebca48e86ed..b1064ccec69 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEnum.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEnum.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public enum JsonEnum { - public enum JsonEnum - { - One, - Two, - Three - } + One, + Two, + Three } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs index d54d567e6e5..340bb7afddd 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs @@ -1,26 +1,25 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonOwnedAllTypes { - public class JsonOwnedAllTypes - { - public short TestInt16 { get; set; } - public int TestInt32 { get; set; } - public long TestInt64 { get; set; } - public double TestDouble { get; set; } - public decimal TestDecimal { get; set; } - public DateTime TestDateTime { get; set; } - public DateTimeOffset TestDateTimeOffset { get; set; } - public TimeSpan TestTimeSpan { get; set; } - public float TestSingle { get; set; } - public bool TestBoolean { get; set; } - public byte TestByte { get; set; } - public Guid TestGuid { get; set; } - public ushort TestUnsignedInt16 { get; set; } - public uint TestUnsignedInt32 { get; set; } - public ulong TestUnsignedInt64 { get; set; } - public char TestCharacter { get; set; } - public sbyte TestSignedByte { get; set; } - } + public short TestInt16 { get; set; } + public int TestInt32 { get; set; } + public long TestInt64 { get; set; } + public double TestDouble { get; set; } + public decimal TestDecimal { get; set; } + public DateTime TestDateTime { get; set; } + public DateTimeOffset TestDateTimeOffset { get; set; } + public TimeSpan TestTimeSpan { get; set; } + public float TestSingle { get; set; } + public bool TestBoolean { get; set; } + public byte TestByte { get; set; } + public Guid TestGuid { get; set; } + public ushort TestUnsignedInt16 { get; set; } + public uint TestUnsignedInt32 { get; set; } + public ulong TestUnsignedInt64 { get; set; } + public char TestCharacter { get; set; } + public sbyte TestSignedByte { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedBranch.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedBranch.cs index 93880c8a1e7..db17d6f0af0 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedBranch.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedBranch.cs @@ -1,16 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonOwnedBranch { - public class JsonOwnedBranch - { - public DateTime Date { get; set; } - public decimal Fraction { get; set; } + public DateTime Date { get; set; } + public decimal Fraction { get; set; } - public JsonEnum Enum { get; set; } + public JsonEnum Enum { get; set; } - public JsonOwnedLeaf OwnedReferenceLeaf { get; set; } - public List OwnedCollectionLeaf { get; set; } - } + public JsonOwnedLeaf OwnedReferenceLeaf { get; set; } + public List OwnedCollectionLeaf { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameBranch.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameBranch.cs index 5cffa045bda..2197c3fbaae 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameBranch.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameBranch.cs @@ -3,14 +3,13 @@ using System.Text.Json.Serialization; -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonOwnedCustomNameBranch { - public class JsonOwnedCustomNameBranch - { - [JsonPropertyName("CustomDate")] - public DateTime Date { get; set; } + [JsonPropertyName("CustomDate")] + public DateTime Date { get; set; } - [JsonPropertyName("CustomFraction")] - public double Fraction { get; set; } - } + [JsonPropertyName("CustomFraction")] + public double Fraction { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameRoot.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameRoot.cs index ba294c7f4c0..7d25c47cb8a 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameRoot.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedCustomNameRoot.cs @@ -3,23 +3,22 @@ using System.Text.Json.Serialization; -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonOwnedCustomNameRoot { - public class JsonOwnedCustomNameRoot - { - [JsonPropertyName("CustomName")] - public string Name { get; set; } + [JsonPropertyName("CustomName")] + public string Name { get; set; } - [JsonPropertyName("CustomNumber")] - public int Number { get; set; } + [JsonPropertyName("CustomNumber")] + public int Number { get; set; } - [JsonPropertyName("CustomEnum")] - public JsonEnum Enum { get; set; } + [JsonPropertyName("CustomEnum")] + public JsonEnum Enum { get; set; } - [JsonPropertyName("CustomOwnedReferenceBranch")] - public JsonOwnedCustomNameBranch OwnedReferenceBranch { get; set; } + [JsonPropertyName("CustomOwnedReferenceBranch")] + public JsonOwnedCustomNameBranch OwnedReferenceBranch { get; set; } - [JsonPropertyName("CustomOwnedCollectionBranch")] - public List OwnedCollectionBranch { get; set; } - } + [JsonPropertyName("CustomOwnedCollectionBranch")] + public List OwnedCollectionBranch { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedLeaf.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedLeaf.cs index 5d973b25fec..5775075a466 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedLeaf.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedLeaf.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonOwnedLeaf { - public class JsonOwnedLeaf - { - public string SomethingSomething { get; set; } + public string SomethingSomething { get; set; } - public JsonOwnedBranch Parent { get; set; } - } + public JsonOwnedBranch Parent { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedRoot.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedRoot.cs index 2c3f2ab257d..fbcd4723807 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedRoot.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedRoot.cs @@ -1,16 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonOwnedRoot { - public class JsonOwnedRoot - { - public string Name { get; set; } - public int Number { get; set; } + public string Name { get; set; } + public int Number { get; set; } - public JsonOwnedBranch OwnedReferenceBranch { get; set; } - public List OwnedCollectionBranch { get; set; } + public JsonOwnedBranch OwnedReferenceBranch { get; set; } + public List OwnedCollectionBranch { get; set; } - public JsonEntityBasic Owner { get; set; } - } + public JsonEntityBasic Owner { get; set; } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryContext.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryContext.cs index 741d2cc0296..834db298cc4 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryContext.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryContext.cs @@ -1,44 +1,43 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery +namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; + +public class JsonQueryContext : DbContext { - public class JsonQueryContext : DbContext + public JsonQueryContext(DbContextOptions options) + : base(options) { - public JsonQueryContext(DbContextOptions options) - : base(options) - { - } + } - public DbSet EntitiesBasic { get; set; } - public DbSet JsonEntitiesBasic { get; set; } - public DbSet JsonEntitiesBasicForReference { get; set; } - public DbSet JsonEntitiesBasicForCollection { get; set; } - public DbSet JsonEntitiesCustomNaming { get; set; } - public DbSet JsonEntitiesSingleOwned { get; set; } - public DbSet JsonEntitiesInheritance { get; set; } - public DbSet JsonEntitiesAllTypes { get; set; } + public DbSet EntitiesBasic { get; set; } + public DbSet JsonEntitiesBasic { get; set; } + public DbSet JsonEntitiesBasicForReference { get; set; } + public DbSet JsonEntitiesBasicForCollection { get; set; } + public DbSet JsonEntitiesCustomNaming { get; set; } + public DbSet JsonEntitiesSingleOwned { get; set; } + public DbSet JsonEntitiesInheritance { get; set; } + public DbSet JsonEntitiesAllTypes { get; set; } - public static void Seed(JsonQueryContext context) - { - var jsonEntitiesBasic = JsonQueryData.CreateJsonEntitiesBasic(); - var jsonEntitiesBasicForReference = JsonQueryData.CreateJsonEntitiesBasicForReference(); - var jsonEntitiesBasicForCollection = JsonQueryData.CreateJsonEntitiesBasicForCollection(); - JsonQueryData.WireUp(jsonEntitiesBasic, jsonEntitiesBasicForReference, jsonEntitiesBasicForCollection); + public static void Seed(JsonQueryContext context) + { + var jsonEntitiesBasic = JsonQueryData.CreateJsonEntitiesBasic(); + var jsonEntitiesBasicForReference = JsonQueryData.CreateJsonEntitiesBasicForReference(); + var jsonEntitiesBasicForCollection = JsonQueryData.CreateJsonEntitiesBasicForCollection(); + JsonQueryData.WireUp(jsonEntitiesBasic, jsonEntitiesBasicForReference, jsonEntitiesBasicForCollection); - var jsonEntitiesCustomNaming = JsonQueryData.CreateJsonEntitiesCustomNaming(); - var jsonEntitiesSingleOwned = JsonQueryData.CreateJsonEntitiesSingleOwned(); - var jsonEntitiesInheritance = JsonQueryData.CreateJsonEntitiesInheritance(); - var jsonEntitiesAllTypes = JsonQueryData.CreateJsonEntitiesAllTypes(); + var jsonEntitiesCustomNaming = JsonQueryData.CreateJsonEntitiesCustomNaming(); + var jsonEntitiesSingleOwned = JsonQueryData.CreateJsonEntitiesSingleOwned(); + var jsonEntitiesInheritance = JsonQueryData.CreateJsonEntitiesInheritance(); + var jsonEntitiesAllTypes = JsonQueryData.CreateJsonEntitiesAllTypes(); - context.JsonEntitiesBasic.AddRange(jsonEntitiesBasic); - context.JsonEntitiesBasicForReference.AddRange(jsonEntitiesBasicForReference); - context.JsonEntitiesBasicForCollection.AddRange(jsonEntitiesBasicForCollection); - context.JsonEntitiesCustomNaming.AddRange(jsonEntitiesCustomNaming); - context.JsonEntitiesSingleOwned.AddRange(jsonEntitiesSingleOwned); - context.JsonEntitiesInheritance.AddRange(jsonEntitiesInheritance); - context.JsonEntitiesAllTypes.AddRange(jsonEntitiesAllTypes); - context.SaveChanges(); - } + context.JsonEntitiesBasic.AddRange(jsonEntitiesBasic); + context.JsonEntitiesBasicForReference.AddRange(jsonEntitiesBasicForReference); + context.JsonEntitiesBasicForCollection.AddRange(jsonEntitiesBasicForCollection); + context.JsonEntitiesCustomNaming.AddRange(jsonEntitiesCustomNaming); + context.JsonEntitiesSingleOwned.AddRange(jsonEntitiesSingleOwned); + context.JsonEntitiesInheritance.AddRange(jsonEntitiesInheritance); + context.JsonEntitiesAllTypes.AddRange(jsonEntitiesAllTypes); + context.SaveChanges(); } } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs index 5f5b6c3a8d0..3b04fb81f5a 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs @@ -100,7 +100,6 @@ public static IReadOnlyList CreateJsonEntitiesBasic() //------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------- - var e1_r = new JsonOwnedRoot { Name = "e1_r", @@ -113,7 +112,6 @@ public static IReadOnlyList CreateJsonEntitiesBasic() //------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------- - var e1_c1_r_r = new JsonOwnedLeaf { SomethingSomething = "e1_c1_r_r" }; var e1_c1_r_c1 = new JsonOwnedLeaf { SomethingSomething = "e1_c1_r_c1" }; var e1_c1_r_c2 = new JsonOwnedLeaf { SomethingSomething = "e1_c1_r_c2" }; @@ -180,7 +178,6 @@ public static IReadOnlyList CreateJsonEntitiesBasic() //------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------- - var e1_c1 = new JsonOwnedRoot { Name = "e1_c1", @@ -193,7 +190,6 @@ public static IReadOnlyList CreateJsonEntitiesBasic() //------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------- - var e1_c2_r_r = new JsonOwnedLeaf { SomethingSomething = "e1_c2_r_r" }; var e1_c2_r_c1 = new JsonOwnedLeaf { SomethingSomething = "e1_c2_r_c1" }; var e1_c2_r_c2 = new JsonOwnedLeaf { SomethingSomething = "e1_c2_r_c2" }; @@ -287,7 +283,6 @@ public static IReadOnlyList CreateJsonEntitiesBasic() return new List { entity1 }; } - public static IReadOnlyList CreateJsonEntitiesBasicForReference() { var entity1 = new JsonEntityBasicForReference { Id = 1, Name = "EntityReference1" }; @@ -301,7 +296,12 @@ public static IReadOnlyList CreateJsonEntitiesBasi var entity2 = new JsonEntityBasicForCollection { Id = 2, Name = "EntityCollection2" }; var entity3 = new JsonEntityBasicForCollection { Id = 3, Name = "EntityCollection3" }; - return new List { entity1, entity2, entity3 }; + return new List + { + entity1, + entity2, + entity3 + }; } public static void WireUp( @@ -313,7 +313,8 @@ public static void WireUp( entitiesBasicForReference[0].Parent = entitiesBasic[0]; entitiesBasicForReference[0].ParentId = entitiesBasic[0].Id; - entitiesBasic[0].EntityCollection = new List { + entitiesBasic[0].EntityCollection = new List + { entitiesBasicForCollection[0], entitiesBasicForCollection[1], entitiesBasicForCollection[2] @@ -331,20 +332,17 @@ public static IReadOnlyList CreateJsonEntitiesCustomNami { var e1_r_r = new JsonOwnedCustomNameBranch { - Date = new DateTime(2100, 1, 1), - Fraction = 10.0, + Date = new DateTime(2100, 1, 1), Fraction = 10.0, }; var e1_r_c1 = new JsonOwnedCustomNameBranch { - Date = new DateTime(2101, 1, 1), - Fraction = 10.1, + Date = new DateTime(2101, 1, 1), Fraction = 10.1, }; var e1_r_c2 = new JsonOwnedCustomNameBranch { - Date = new DateTime(2102, 1, 1), - Fraction = 10.2, + Date = new DateTime(2102, 1, 1), Fraction = 10.2, }; var e1_r = new JsonOwnedCustomNameRoot @@ -358,20 +356,17 @@ public static IReadOnlyList CreateJsonEntitiesCustomNami var e1_c1_r = new JsonOwnedCustomNameBranch { - Date = new DateTime(2110, 1, 1), - Fraction = 11.0, + Date = new DateTime(2110, 1, 1), Fraction = 11.0, }; var e1_c1_c1 = new JsonOwnedCustomNameBranch { - Date = new DateTime(2111, 1, 1), - Fraction = 11.1, + Date = new DateTime(2111, 1, 1), Fraction = 11.1, }; var e1_c1_c2 = new JsonOwnedCustomNameBranch { - Date = new DateTime(2112, 1, 1), - Fraction = 11.2, + Date = new DateTime(2112, 1, 1), Fraction = 11.2, }; var e1_c1 = new JsonOwnedCustomNameRoot @@ -385,20 +380,17 @@ public static IReadOnlyList CreateJsonEntitiesCustomNami var e1_c2_r = new JsonOwnedCustomNameBranch { - Date = new DateTime(2120, 1, 1), - Fraction = 12.0, + Date = new DateTime(2120, 1, 1), Fraction = 12.0, }; var e1_c2_c1 = new JsonOwnedCustomNameBranch { - Date = new DateTime(2121, 1, 1), - Fraction = 12.1, + Date = new DateTime(2121, 1, 1), Fraction = 12.1, }; var e1_c2_c2 = new JsonOwnedCustomNameBranch { - Date = new DateTime(2122, 1, 1), - Fraction = 12.2, + Date = new DateTime(2122, 1, 1), Fraction = 12.2, }; var e1_c2 = new JsonOwnedCustomNameRoot @@ -429,9 +421,9 @@ public static IReadOnlyList CreateJsonEntitiesSingleOwned Name = "JsonEntitySingleOwned1", OwnedCollection = new List { - new JsonOwnedLeaf { SomethingSomething = "owned_1_1" }, - new JsonOwnedLeaf { SomethingSomething = "owned_1_2" }, - new JsonOwnedLeaf { SomethingSomething = "owned_1_3" }, + new() { SomethingSomething = "owned_1_1" }, + new() { SomethingSomething = "owned_1_2" }, + new() { SomethingSomething = "owned_1_3" }, } }; @@ -439,9 +431,7 @@ public static IReadOnlyList CreateJsonEntitiesSingleOwned { Id = 2, Name = "JsonEntitySingleOwned2", - OwnedCollection = new List - { - } + OwnedCollection = new List() }; var e3 = new JsonEntitySingleOwned @@ -450,238 +440,151 @@ public static IReadOnlyList CreateJsonEntitiesSingleOwned Name = "JsonEntitySingleOwned3", OwnedCollection = new List { - new JsonOwnedLeaf { SomethingSomething = "owned_3_1" }, - new JsonOwnedLeaf { SomethingSomething = "owned_3_2" }, + new() { SomethingSomething = "owned_3_1" }, new() { SomethingSomething = "owned_3_2" }, } }; - return new List { e1, e2, e3 }; + return new List + { + e1, + e2, + e3 + }; } public static IReadOnlyList CreateJsonEntitiesInheritance() { - var b1_r_r = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_r", - }; - - var b1_r_c1 = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_c1", - }; + var b1_r_r = new JsonOwnedLeaf { SomethingSomething = "b1_r_r", }; - var b1_r_c2 = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_c2", - }; + var b1_r_c1 = new JsonOwnedLeaf { SomethingSomething = "b1_r_c1", }; + var b1_r_c2 = new JsonOwnedLeaf { SomethingSomething = "b1_r_c2", }; var b1_r = new JsonOwnedBranch { Date = new DateTime(2010, 1, 1), Fraction = 1.0M, Enum = JsonEnum.One, - OwnedReferenceLeaf = b1_r_r, OwnedCollectionLeaf = new List { b1_r_c1, b1_r_c2 } }; - var b1_c1_r = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_r", - }; + var b1_c1_r = new JsonOwnedLeaf { SomethingSomething = "b1_r_r", }; - var b1_c1_c1 = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_c1", - }; + var b1_c1_c1 = new JsonOwnedLeaf { SomethingSomething = "b1_r_c1", }; - var b1_c1_c2 = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_c2", - }; + var b1_c1_c2 = new JsonOwnedLeaf { SomethingSomething = "b1_r_c2", }; var b1_c1 = new JsonOwnedBranch { Date = new DateTime(2011, 1, 1), Fraction = 11.1M, Enum = JsonEnum.Three, - OwnedReferenceLeaf = b1_c1_r, OwnedCollectionLeaf = new List { b1_c1_c1, b1_c1_c2 } }; - var b1_c2_r = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_r", - }; + var b1_c2_r = new JsonOwnedLeaf { SomethingSomething = "b1_r_r", }; - var b1_c2_c1 = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_c1", - }; + var b1_c2_c1 = new JsonOwnedLeaf { SomethingSomething = "b1_r_c1", }; - var b1_c2_c2 = new JsonOwnedLeaf - { - SomethingSomething = "b1_r_c2", - }; + var b1_c2_c2 = new JsonOwnedLeaf { SomethingSomething = "b1_r_c2", }; var b1_c2 = new JsonOwnedBranch { Date = new DateTime(2012, 1, 1), Fraction = 12.1M, Enum = JsonEnum.Two, - OwnedReferenceLeaf = b1_c2_r, OwnedCollectionLeaf = new List { b1_c2_c1, b1_c2_c2 } }; - var b2_r_r = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_r", - }; + var b2_r_r = new JsonOwnedLeaf { SomethingSomething = "b2_r_r", }; - var b2_r_c1 = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_c1", - }; + var b2_r_c1 = new JsonOwnedLeaf { SomethingSomething = "b2_r_c1", }; - var b2_r_c2 = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_c2", - }; + var b2_r_c2 = new JsonOwnedLeaf { SomethingSomething = "b2_r_c2", }; var b2_r = new JsonOwnedBranch { Date = new DateTime(2020, 1, 1), Fraction = 2.0M, Enum = JsonEnum.Two, - OwnedReferenceLeaf = b2_r_r, OwnedCollectionLeaf = new List { b2_r_c1, b2_r_c2 } }; - var b2_c1_r = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_r", - }; + var b2_c1_r = new JsonOwnedLeaf { SomethingSomething = "b2_r_r", }; - var b2_c1_c1 = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_c1", - }; + var b2_c1_c1 = new JsonOwnedLeaf { SomethingSomething = "b2_r_c1", }; - var b2_c1_c2 = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_c2", - }; + var b2_c1_c2 = new JsonOwnedLeaf { SomethingSomething = "b2_r_c2", }; var b2_c1 = new JsonOwnedBranch { Date = new DateTime(2021, 1, 1), Fraction = 21.1M, Enum = JsonEnum.Three, - OwnedReferenceLeaf = b2_c1_r, OwnedCollectionLeaf = new List { b2_c1_c1, b2_c1_c2 } }; - var b2_c2_r = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_r", - }; + var b2_c2_r = new JsonOwnedLeaf { SomethingSomething = "b2_r_r", }; - var b2_c2_c1 = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_c1", - }; + var b2_c2_c1 = new JsonOwnedLeaf { SomethingSomething = "b2_r_c1", }; - var b2_c2_c2 = new JsonOwnedLeaf - { - SomethingSomething = "b2_r_c2", - }; + var b2_c2_c2 = new JsonOwnedLeaf { SomethingSomething = "b2_r_c2", }; var b2_c2 = new JsonOwnedBranch { Date = new DateTime(2022, 1, 1), Fraction = 22.1M, Enum = JsonEnum.One, - OwnedReferenceLeaf = b2_c2_r, OwnedCollectionLeaf = new List { b2_c2_c1, b2_c2_c2 } }; - var d2_r_r = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_r", - }; + var d2_r_r = new JsonOwnedLeaf { SomethingSomething = "d2_r_r", }; - var d2_r_c1 = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_c1", - }; + var d2_r_c1 = new JsonOwnedLeaf { SomethingSomething = "d2_r_c1", }; - var d2_r_c2 = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_c2", - }; + var d2_r_c2 = new JsonOwnedLeaf { SomethingSomething = "d2_r_c2", }; var d2_r = new JsonOwnedBranch { Date = new DateTime(2220, 1, 1), Fraction = 22.0M, Enum = JsonEnum.One, - OwnedReferenceLeaf = d2_r_r, OwnedCollectionLeaf = new List { d2_r_c1, d2_r_c2 } }; - var d2_c1_r = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_r", - }; + var d2_c1_r = new JsonOwnedLeaf { SomethingSomething = "d2_r_r", }; - var d2_c1_c1 = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_c1", - }; + var d2_c1_c1 = new JsonOwnedLeaf { SomethingSomething = "d2_r_c1", }; - var d2_c1_c2 = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_c2", - }; + var d2_c1_c2 = new JsonOwnedLeaf { SomethingSomething = "d2_r_c2", }; var d2_c1 = new JsonOwnedBranch { Date = new DateTime(2221, 1, 1), Fraction = 221.1M, Enum = JsonEnum.Two, - OwnedReferenceLeaf = d2_c1_r, OwnedCollectionLeaf = new List { d2_c1_c1, d2_c1_c2 } }; - var d2_c2_r = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_r", - }; + var d2_c2_r = new JsonOwnedLeaf { SomethingSomething = "d2_r_r", }; - var d2_c2_c1 = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_c1", - }; + var d2_c2_c1 = new JsonOwnedLeaf { SomethingSomething = "d2_r_c1", }; - var d2_c2_c2 = new JsonOwnedLeaf - { - SomethingSomething = "d2_r_c2", - }; + var d2_c2_c2 = new JsonOwnedLeaf { SomethingSomething = "d2_r_c2", }; var d2_c2 = new JsonOwnedBranch { Date = new DateTime(2222, 1, 1), Fraction = 222.1M, Enum = JsonEnum.Three, - OwnedReferenceLeaf = d2_c2_r, OwnedCollectionLeaf = new List { d2_c2_c1, d2_c2_c2 } }; @@ -700,7 +603,6 @@ public static IReadOnlyList CreateJsonEntitiesInherit Name = "JsonEntityInheritanceDerived2", ReferenceOnBase = b2_r, CollectionOnBase = new List { b2_c1, b2_c2 }, - ReferenceOnDerived = d2_r, CollectionOnDerived = new List { d2_c1, d2_c2 }, }; @@ -754,7 +656,12 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() return new List { - new JsonEntityAllTypes { Id = 1, Reference = r, Collection = new List { c } } + new() + { + Id = 1, + Reference = r, + Collection = new List { c } + } }; } diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/StoreValueGenerationModel/StoreValueGenerationContext.cs b/test/EFCore.Relational.Specification.Tests/TestModels/StoreValueGenerationModel/StoreValueGenerationContext.cs index 37ad0921d58..6c66b7f3c75 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/StoreValueGenerationModel/StoreValueGenerationContext.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/StoreValueGenerationModel/StoreValueGenerationContext.cs @@ -14,16 +14,19 @@ public StoreValueGenerationContext(DbContextOptions options) public DbSet WithSomeDatabaseGenerated => Set(nameof(WithSomeDatabaseGenerated)); + public DbSet WithSomeDatabaseGenerated2 => Set(nameof(WithSomeDatabaseGenerated2)); public DbSet WithNoDatabaseGenerated => Set(nameof(WithNoDatabaseGenerated)); + public DbSet WithNoDatabaseGenerated2 => Set(nameof(WithNoDatabaseGenerated2)); public DbSet WithAllDatabaseGenerated => Set(nameof(WithAllDatabaseGenerated)); + public DbSet WithAllDatabaseGenerated2 => Set(nameof(WithAllDatabaseGenerated2)); } diff --git a/test/EFCore.Relational.Specification.Tests/TestUtilities/BuildReference.cs b/test/EFCore.Relational.Specification.Tests/TestUtilities/BuildReference.cs index e56c51a4b99..d26a038c84f 100644 --- a/test/EFCore.Relational.Specification.Tests/TestUtilities/BuildReference.cs +++ b/test/EFCore.Relational.Specification.Tests/TestUtilities/BuildReference.cs @@ -31,8 +31,8 @@ where IOPath.GetFileNameWithoutExtension(r) == name if (references.Count == 0) { throw new InvalidOperationException( - $"Assembly '{name}' not found. " + - "You may be missing 'true' in your test project's csproj."); + $"Assembly '{name}' not found. " + + "You may be missing 'true' in your test project's csproj."); } return new BuildReference( diff --git a/test/EFCore.Relational.Specification.Tests/TestUtilities/TestOperationReporter.cs b/test/EFCore.Relational.Specification.Tests/TestUtilities/TestOperationReporter.cs index 76ae0cc7712..55835f7689b 100644 --- a/test/EFCore.Relational.Specification.Tests/TestUtilities/TestOperationReporter.cs +++ b/test/EFCore.Relational.Specification.Tests/TestUtilities/TestOperationReporter.cs @@ -11,7 +11,9 @@ public class TestOperationReporter : IOperationReporter private readonly List<(LogLevel, string)> _messages = new(); public TestOperationReporter(ITestOutputHelper output = null) - => _output = output; + { + _output = output; + } public IReadOnlyList<(LogLevel Level, string Message)> Messages => _messages; diff --git a/test/EFCore.Relational.Specification.Tests/TestUtilities/TestSqlLoggerFactory.cs b/test/EFCore.Relational.Specification.Tests/TestUtilities/TestSqlLoggerFactory.cs index 58b511e666f..211fd5b3625 100644 --- a/test/EFCore.Relational.Specification.Tests/TestUtilities/TestSqlLoggerFactory.cs +++ b/test/EFCore.Relational.Specification.Tests/TestUtilities/TestSqlLoggerFactory.cs @@ -102,7 +102,8 @@ public void AssertBaseline(string[] expected, bool assertOrder = true, bool forU } var sql = string.Join( - "," + indent + "//" + indent, SqlStatements.Skip(offset).Take(count).Select(sql => "@\"" + sql.Replace("\"", "\"\"") + "\"")); + "," + indent + "//" + indent, + SqlStatements.Skip(offset).Take(count).Select(sql => "@\"" + sql.Replace("\"", "\"\"") + "\"")); var newBaseLine = $@" Assert{(forUpdate ? "ExecuteUpdate" : "")}Sql( {string.Join("," + indent + "//" + indent, SqlStatements.Skip(offset).Take(count).Select(sql => "@\"" + sql.Replace("\"", "\"\"") + "\""))}); @@ -156,7 +157,7 @@ public void AssertBaseline(string[] expected, bool assertOrder = true, bool forU void RewriteSourceWithNewBaseline(string fileName, int lineNumber) { - var fileInfo = _queryBaselineRewritingFileInfos.GetOrAdd(fileName, _ => new()); + var fileInfo = _queryBaselineRewritingFileInfos.GetOrAdd(fileName, _ => new QueryBaselineRewritingFileInfo()); lock (fileInfo.Lock) { // First, adjust our lineNumber to take into account any baseline rewriting that already occured in this file @@ -405,13 +406,13 @@ private struct QueryBaselineRewritingFileInfo { public QueryBaselineRewritingFileInfo() { } - public object Lock { get; set; } = new(); + public object Lock { get; } = new(); /// /// Contains information on where previous baseline rewriting caused line numbers to shift; this is used in adjusting line /// numbers for later errors. The keys are (pre-rewriting) line numbers, and the values are offsets that have been applied to /// them. /// - public SortedDictionary LineDisplacements = new(); + public readonly SortedDictionary LineDisplacements = new(); } } diff --git a/test/EFCore.Relational.Specification.Tests/TransactionTestBase.cs b/test/EFCore.Relational.Specification.Tests/TransactionTestBase.cs index ff5782e7525..bc6cf683de8 100644 --- a/test/EFCore.Relational.Specification.Tests/TransactionTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/TransactionTestBase.cs @@ -147,8 +147,7 @@ public virtual async Task SaveChanges_can_be_used_with_AutoTransactionBehavior_A Assert.Equal( new List { - 1, - 2, + 1, 2, }, context.Set().OrderBy(c => c.Id).Select(e => e.Id).ToList()); } @@ -255,7 +254,8 @@ public virtual async Task SaveChanges_uses_enlisted_transaction(bool async, Auto [InlineData(false, AutoTransactionBehavior.Never)] [InlineData(false, AutoTransactionBehavior.Always)] public virtual async Task SaveChanges_uses_enlisted_transaction_after_connection_closed( - bool async, AutoTransactionBehavior autoTransactionBehavior) + bool async, + AutoTransactionBehavior autoTransactionBehavior) { if (!AmbientTransactionsSupported) { @@ -305,7 +305,8 @@ public virtual async Task SaveChanges_uses_enlisted_transaction_after_connection [InlineData(false, AutoTransactionBehavior.Never)] [InlineData(false, AutoTransactionBehavior.Always)] public virtual async Task SaveChanges_uses_enlisted_transaction_connectionString( - bool async, AutoTransactionBehavior autoTransactionBehavior) + bool async, + AutoTransactionBehavior autoTransactionBehavior) { if (!AmbientTransactionsSupported) { @@ -415,7 +416,9 @@ public virtual async Task SaveChanges_uses_ambient_transaction(bool async, AutoT [InlineData(false, AutoTransactionBehavior.WhenNeeded)] [InlineData(false, AutoTransactionBehavior.Never)] [InlineData(false, AutoTransactionBehavior.Always)] - public virtual async Task SaveChanges_uses_ambient_transaction_with_connectionString(bool async, AutoTransactionBehavior autoTransactionBehavior) + public virtual async Task SaveChanges_uses_ambient_transaction_with_connectionString( + bool async, + AutoTransactionBehavior autoTransactionBehavior) { if (!AmbientTransactionsSupported) { @@ -662,7 +665,8 @@ public virtual async Task SaveChanges_does_not_close_connection_opened_by_user(b [InlineData(false, AutoTransactionBehavior.Never)] [InlineData(false, AutoTransactionBehavior.Always)] public virtual async Task SaveChanges_uses_explicit_transaction_without_committing( - bool async, AutoTransactionBehavior autoTransactionBehavior) + bool async, + AutoTransactionBehavior autoTransactionBehavior) { using (var context = CreateContext()) { @@ -747,7 +751,8 @@ public virtual async Task SaveChanges_false_uses_explicit_transaction_without_co [InlineData(false, AutoTransactionBehavior.Never)] [InlineData(false, AutoTransactionBehavior.Always)] public virtual async Task SaveChanges_uses_explicit_transaction_with_failure_behavior( - bool async, AutoTransactionBehavior autoTransactionBehavior) + bool async, + AutoTransactionBehavior autoTransactionBehavior) { using (var context = CreateContext()) { diff --git a/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateFixtureBase.cs index 323eb2e57be..b3fe4d6c2e5 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateFixtureBase.cs @@ -6,8 +6,9 @@ namespace Microsoft.EntityFrameworkCore.Update; public abstract class JsonUpdateFixtureBase : SharedStoreFixtureBase -{ - protected override string StoreName => "JsonUpdateTest"; +{ + protected override string StoreName + => "JsonUpdateTest"; public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; @@ -15,99 +16,113 @@ public TestSqlLoggerFactory TestSqlLoggerFactory protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity().OwnsOne(x => x.OwnedReferenceRoot, b => - { - b.ToJson(); - b.WithOwner(x => x.Owner); - b.OwnsOne(x => x.OwnedReferenceBranch, bb => + modelBuilder.Entity().OwnsOne( + x => x.OwnedReferenceRoot, b => { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); - bb.OwnsMany(x => x.OwnedCollectionLeaf); + b.ToJson(); + b.WithOwner(x => x.Owner); + b.OwnsOne( + x => x.OwnedReferenceBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + }); + b.OwnsMany( + x => x.OwnedCollectionBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.Navigation(x => x.OwnedReferenceLeaf).IsRequired(false); + bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); + }); }); - b.OwnsMany(x => x.OwnedCollectionBranch, bb => - { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.Navigation(x => x.OwnedReferenceLeaf).IsRequired(false); - bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); - }); - }); modelBuilder.Entity().Navigation(x => x.OwnedReferenceRoot).IsRequired(false); - modelBuilder.Entity().OwnsMany(x => x.OwnedCollectionRoot, b => - { - b.OwnsOne(x => x.OwnedReferenceBranch, bb => - { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); - }); - - b.OwnsMany(x => x.OwnedCollectionBranch, bb => + modelBuilder.Entity().OwnsMany( + x => x.OwnedCollectionRoot, b => { - bb.Property(x => x.Fraction).HasPrecision(18, 2); - bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); - bb.OwnsMany(x => x.OwnedCollectionLeaf); + b.OwnsOne( + x => x.OwnedReferenceBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf).WithOwner(x => x.Parent); + }); + + b.OwnsMany( + x => x.OwnedCollectionBranch, bb => + { + bb.Property(x => x.Fraction).HasPrecision(18, 2); + bb.OwnsOne(x => x.OwnedReferenceLeaf).WithOwner(x => x.Parent); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + }); + b.ToJson(); }); - b.ToJson(); - }); modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.ReferenceOnBase, bb => - { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); - }); - - b.OwnsMany(x => x.CollectionOnBase, bb => + modelBuilder.Entity( + b => { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); + b.OwnsOne( + x => x.ReferenceOnBase, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); + + b.OwnsMany( + x => x.CollectionOnBase, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); }); - }); - modelBuilder.Entity(b => - { - b.HasBaseType(); - b.OwnsOne(x => x.ReferenceOnDerived, bb => + modelBuilder.Entity( + b => { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); + b.HasBaseType(); + b.OwnsOne( + x => x.ReferenceOnDerived, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); + + b.OwnsMany( + x => x.CollectionOnDerived, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.OwnedReferenceLeaf); + bb.OwnsMany(x => x.OwnedCollectionLeaf); + bb.Property(x => x.Fraction).HasPrecision(18, 2); + }); }); - b.OwnsMany(x => x.CollectionOnDerived, bb => - { - bb.ToJson(); - bb.OwnsOne(x => x.OwnedReferenceLeaf); - bb.OwnsMany(x => x.OwnedCollectionLeaf); - bb.Property(x => x.Fraction).HasPrecision(18, 2); - }); - }); - modelBuilder.Ignore(); modelBuilder.Ignore(); modelBuilder.Entity().Property(x => x.Id).ValueGeneratedNever(); - modelBuilder.Entity().OwnsOne(x => x.Reference, b => - { - b.ToJson(); - b.Property(x => x.TestDecimal).HasPrecision(18, 3); - }); - modelBuilder.Entity().OwnsMany(x => x.Collection, b => - { - b.ToJson(); - b.Property(x => x.TestDecimal).HasPrecision(18, 3); - }); + modelBuilder.Entity().OwnsOne( + x => x.Reference, b => + { + b.ToJson(); + b.Property(x => x.TestDecimal).HasPrecision(18, 3); + }); + modelBuilder.Entity().OwnsMany( + x => x.Collection, b => + { + b.ToJson(); + b.Property(x => x.TestDecimal).HasPrecision(18, 3); + }); base.OnModelCreating(modelBuilder, context); } diff --git a/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs b/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs index 562372c3227..883a3d374d0 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs @@ -15,7 +15,8 @@ protected JsonUpdateTestBase(TFixture fixture) Fixture = fixture; } - public JsonQueryContext CreateContext() => Fixture.CreateContext(); + public JsonQueryContext CreateContext() + => Fixture.CreateContext(); [ConditionalFact] public virtual Task Add_entity_with_json() @@ -40,10 +41,9 @@ public virtual Task Add_entity_with_json() Enum = JsonEnum.Three, Fraction = 42.42m, OwnedCollectionLeaf = new List - { - new JsonOwnedLeaf { SomethingSomething = "ss1" }, - new JsonOwnedLeaf { SomethingSomething = "ss2" }, - }, + { + new() { SomethingSomething = "ss1" }, new() { SomethingSomething = "ss2" }, + }, OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "ss3" } } }, @@ -107,8 +107,7 @@ public virtual Task Add_json_reference_root() Fraction = 42.42m, OwnedCollectionLeaf = new List { - new JsonOwnedLeaf { SomethingSomething = "ss1" }, - new JsonOwnedLeaf { SomethingSomething = "ss2" }, + new() { SomethingSomething = "ss1" }, new() { SomethingSomething = "ss2" }, }, OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "ss3" } } @@ -116,7 +115,6 @@ public virtual Task Add_json_reference_root() ClearLog(); await context.SaveChangesAsync(); }, - async context => { var updatedEntity = await context.JsonEntitiesBasic.SingleAsync(); @@ -186,10 +184,9 @@ public virtual Task Add_element_to_json_collection_root() Enum = JsonEnum.Three, Fraction = 42.42m, OwnedCollectionLeaf = new List - { - new JsonOwnedLeaf { SomethingSomething = "ss1" }, - new JsonOwnedLeaf { SomethingSomething = "ss2" }, - }, + { + new() { SomethingSomething = "ss1" }, new() { SomethingSomething = "ss2" }, + }, OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "ss3" } } }; @@ -231,10 +228,9 @@ public virtual Task Add_element_to_json_collection_branch() Enum = JsonEnum.Three, Fraction = 42.42m, OwnedCollectionLeaf = new List - { - new JsonOwnedLeaf { SomethingSomething = "ss1" }, - new JsonOwnedLeaf { SomethingSomething = "ss2" }, - }, + { + new() { SomethingSomething = "ss1" }, new() { SomethingSomething = "ss2" }, + }, OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "ss3" } }; @@ -456,10 +452,9 @@ public virtual Task Add_element_to_json_collection_on_derived() Enum = JsonEnum.Three, Fraction = 42.42m, OwnedCollectionLeaf = new List - { - new JsonOwnedLeaf { SomethingSomething = "ss1" }, - new JsonOwnedLeaf { SomethingSomething = "ss2" }, - }, + { + new() { SomethingSomething = "ss1" }, new() { SomethingSomething = "ss2" }, + }, OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "ss3" } }; @@ -505,9 +500,12 @@ public virtual Task Edit_element_in_json_multiple_levels_partial_update() var result = await context.Set().SingleAsync(); Assert.Equal(new DateTime(2111, 11, 11), result.OwnedReferenceRoot.OwnedReferenceBranch.Date); Assert.Equal("edit", result.OwnedReferenceRoot.Name); - Assert.Equal("yet another change", result.OwnedCollectionRoot[0].OwnedCollectionBranch[1].OwnedCollectionLeaf[0].SomethingSomething); - Assert.Equal("and another", result.OwnedCollectionRoot[0].OwnedCollectionBranch[1].OwnedCollectionLeaf[1].SomethingSomething); - Assert.Equal("...and another", result.OwnedCollectionRoot[0].OwnedCollectionBranch[0].OwnedCollectionLeaf[0].SomethingSomething); + Assert.Equal( + "yet another change", result.OwnedCollectionRoot[0].OwnedCollectionBranch[1].OwnedCollectionLeaf[0].SomethingSomething); + Assert.Equal( + "and another", result.OwnedCollectionRoot[0].OwnedCollectionBranch[1].OwnedCollectionLeaf[1].SomethingSomething); + Assert.Equal( + "...and another", result.OwnedCollectionRoot[0].OwnedCollectionBranch[0].OwnedCollectionLeaf[0].SomethingSomething); }); [ConditionalFact] @@ -520,13 +518,14 @@ public virtual Task Edit_element_in_json_branch_collection_and_add_element_to_th var query = await context.JsonEntitiesBasic.ToListAsync(); var entity = query.Single(); entity.OwnedReferenceRoot.OwnedCollectionBranch[0].Fraction = 4321.3m; - entity.OwnedReferenceRoot.OwnedCollectionBranch.Add(new JsonOwnedBranch - { - Date = new DateTime(2222, 11, 11), - Enum = JsonEnum.Three, - Fraction = 45.32m, - OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "cc" }, - }); + entity.OwnedReferenceRoot.OwnedCollectionBranch.Add( + new JsonOwnedBranch + { + Date = new DateTime(2222, 11, 11), + Enum = JsonEnum.Three, + Fraction = 45.32m, + OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "cc" }, + }); ClearLog(); await context.SaveChangesAsync(); @@ -676,472 +675,471 @@ public virtual Task Edit_single_property_bool() [ConditionalFact] public virtual Task Edit_single_property_byte() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestByte = 25; - entity.Collection[0].TestByte = 14; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(25, result.Reference.TestByte); - Assert.Equal(14, result.Collection[0].TestByte); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestByte = 25; + entity.Collection[0].TestByte = 14; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(25, result.Reference.TestByte); + Assert.Equal(14, result.Collection[0].TestByte); + }); [ConditionalFact] public virtual Task Edit_single_property_char() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestCharacter = 't'; - entity.Collection[0].TestCharacter = 'h'; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal('t', result.Reference.TestCharacter); - Assert.Equal('h', result.Collection[0].TestCharacter); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestCharacter = 't'; + entity.Collection[0].TestCharacter = 'h'; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal('t', result.Reference.TestCharacter); + Assert.Equal('h', result.Collection[0].TestCharacter); + }); [ConditionalFact] public virtual Task Edit_single_property_datetime() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestDateTime = DateTime.Parse("01/01/3000 12:34:56"); - entity.Collection[0].TestDateTime = DateTime.Parse("01/01/3000 12:34:56"); - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(DateTime.Parse("01/01/3000 12:34:56"), result.Reference.TestDateTime); - Assert.Equal(DateTime.Parse("01/01/3000 12:34:56"), result.Collection[0].TestDateTime); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestDateTime = DateTime.Parse("01/01/3000 12:34:56"); + entity.Collection[0].TestDateTime = DateTime.Parse("01/01/3000 12:34:56"); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(DateTime.Parse("01/01/3000 12:34:56"), result.Reference.TestDateTime); + Assert.Equal(DateTime.Parse("01/01/3000 12:34:56"), result.Collection[0].TestDateTime); + }); [ConditionalFact] public virtual Task Edit_single_property_datetimeoffset() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestDateTimeOffset = new DateTimeOffset(DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)); - entity.Collection[0].TestDateTimeOffset = new DateTimeOffset(DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)); - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(new DateTimeOffset(DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)), result.Reference.TestDateTimeOffset); - Assert.Equal(new DateTimeOffset(DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)), result.Collection[0].TestDateTimeOffset); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestDateTimeOffset = new DateTimeOffset(DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)); + entity.Collection[0].TestDateTimeOffset = new DateTimeOffset( + DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal( + new DateTimeOffset(DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)), + result.Reference.TestDateTimeOffset); + Assert.Equal( + new DateTimeOffset(DateTime.Parse("01/01/3000 12:34:56"), TimeSpan.FromHours(-4.0)), + result.Collection[0].TestDateTimeOffset); + }); [ConditionalFact] public virtual Task Edit_single_property_decimal() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestDecimal = -13579.01M; - entity.Collection[0].TestDecimal = -13579.01M; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(-13579.01M, result.Reference.TestDecimal); - Assert.Equal(-13579.01M, result.Collection[0].TestDecimal); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestDecimal = -13579.01M; + entity.Collection[0].TestDecimal = -13579.01M; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(-13579.01M, result.Reference.TestDecimal); + Assert.Equal(-13579.01M, result.Collection[0].TestDecimal); + }); [ConditionalFact] public virtual Task Edit_single_property_double() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestDouble = -1.23579; - entity.Collection[0].TestDouble = -1.23579; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(-1.23579, result.Reference.TestDouble); - Assert.Equal(-1.23579, result.Collection[0].TestDouble); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestDouble = -1.23579; + entity.Collection[0].TestDouble = -1.23579; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(-1.23579, result.Reference.TestDouble); + Assert.Equal(-1.23579, result.Collection[0].TestDouble); + }); [ConditionalFact] public virtual Task Edit_single_property_guid() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestGuid = new Guid("12345678-1234-4321-5555-987654321000"); - entity.Collection[0].TestGuid = new Guid("12345678-1234-4321-5555-987654321000"); - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(new Guid("12345678-1234-4321-5555-987654321000"), result.Reference.TestGuid); - Assert.Equal(new Guid("12345678-1234-4321-5555-987654321000"), result.Collection[0].TestGuid); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestGuid = new Guid("12345678-1234-4321-5555-987654321000"); + entity.Collection[0].TestGuid = new Guid("12345678-1234-4321-5555-987654321000"); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(new Guid("12345678-1234-4321-5555-987654321000"), result.Reference.TestGuid); + Assert.Equal(new Guid("12345678-1234-4321-5555-987654321000"), result.Collection[0].TestGuid); + }); [ConditionalFact] public virtual Task Edit_single_property_int16() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestInt16 = -3234; - entity.Collection[0].TestInt16 = -3234; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(-3234, result.Reference.TestInt16); - Assert.Equal(-3234, result.Collection[0].TestInt16); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestInt16 = -3234; + entity.Collection[0].TestInt16 = -3234; + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(-3234, result.Reference.TestInt16); + Assert.Equal(-3234, result.Collection[0].TestInt16); + }); [ConditionalFact] public virtual Task Edit_single_property_int32() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestInt32 = -3234; - entity.Collection[0].TestInt32 = -3234; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(-3234, result.Reference.TestInt32); - Assert.Equal(-3234, result.Collection[0].TestInt32); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestInt32 = -3234; + entity.Collection[0].TestInt32 = -3234; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(-3234, result.Reference.TestInt32); + Assert.Equal(-3234, result.Collection[0].TestInt32); + }); [ConditionalFact] public virtual Task Edit_single_property_int64() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestInt64 = -3234; - entity.Collection[0].TestInt64 = -3234; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(-3234, result.Reference.TestInt64); - Assert.Equal(-3234, result.Collection[0].TestInt64); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestInt64 = -3234; + entity.Collection[0].TestInt64 = -3234; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(-3234, result.Reference.TestInt64); + Assert.Equal(-3234, result.Collection[0].TestInt64); + }); [ConditionalFact] public virtual Task Edit_single_property_signed_byte() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestSignedByte = -108; - entity.Collection[0].TestSignedByte = -108; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(-108, result.Reference.TestSignedByte); - Assert.Equal(-108, result.Collection[0].TestSignedByte); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestSignedByte = -108; + entity.Collection[0].TestSignedByte = -108; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(-108, result.Reference.TestSignedByte); + Assert.Equal(-108, result.Collection[0].TestSignedByte); + }); [ConditionalFact] public virtual Task Edit_single_property_single() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestSingle = -7.234F; - entity.Collection[0].TestSingle = -7.234F; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(-7.234F, result.Reference.TestSingle); - Assert.Equal(-7.234F, result.Collection[0].TestSingle); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestSingle = -7.234F; + entity.Collection[0].TestSingle = -7.234F; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(-7.234F, result.Reference.TestSingle); + Assert.Equal(-7.234F, result.Collection[0].TestSingle); + }); [ConditionalFact] public virtual Task Edit_single_property_timespan() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestTimeSpan = new TimeSpan(0, 10, 1, 1, 7); - entity.Collection[0].TestTimeSpan = new TimeSpan(0, 10, 1, 1, 7); - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(new TimeSpan(0, 10, 1, 1, 7), result.Reference.TestTimeSpan); - Assert.Equal(new TimeSpan(0, 10, 1, 1, 7), result.Collection[0].TestTimeSpan); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestTimeSpan = new TimeSpan(0, 10, 1, 1, 7); + entity.Collection[0].TestTimeSpan = new TimeSpan(0, 10, 1, 1, 7); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(new TimeSpan(0, 10, 1, 1, 7), result.Reference.TestTimeSpan); + Assert.Equal(new TimeSpan(0, 10, 1, 1, 7), result.Collection[0].TestTimeSpan); + }); [ConditionalFact] public virtual Task Edit_single_property_uint16() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestUnsignedInt16 = 1534; - entity.Collection[0].TestUnsignedInt16 = 1534; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(1534, result.Reference.TestUnsignedInt16); - Assert.Equal(1534, result.Collection[0].TestUnsignedInt16); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestUnsignedInt16 = 1534; + entity.Collection[0].TestUnsignedInt16 = 1534; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(1534, result.Reference.TestUnsignedInt16); + Assert.Equal(1534, result.Collection[0].TestUnsignedInt16); + }); [ConditionalFact] public virtual Task Edit_single_property_uint32() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestUnsignedInt32 = 1237775789U; - entity.Collection[0].TestUnsignedInt32 = 1237775789U; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(1237775789U, result.Reference.TestUnsignedInt32); - Assert.Equal(1237775789U, result.Collection[0].TestUnsignedInt32); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestUnsignedInt32 = 1237775789U; + entity.Collection[0].TestUnsignedInt32 = 1237775789U; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(1237775789U, result.Reference.TestUnsignedInt32); + Assert.Equal(1237775789U, result.Collection[0].TestUnsignedInt32); + }); [ConditionalFact] public virtual Task Edit_single_property_uint64() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestUnsignedInt64 = 1234555555123456789UL; - entity.Collection[0].TestUnsignedInt64 = 1234555555123456789UL; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(1234555555123456789UL, result.Reference.TestUnsignedInt64); - Assert.Equal(1234555555123456789UL, result.Collection[0].TestUnsignedInt64); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestUnsignedInt64 = 1234555555123456789UL; + entity.Collection[0].TestUnsignedInt64 = 1234555555123456789UL; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(1234555555123456789UL, result.Reference.TestUnsignedInt64); + Assert.Equal(1234555555123456789UL, result.Collection[0].TestUnsignedInt64); + }); [ConditionalFact] public virtual Task Edit_two_properties_on_same_entity_updates_the_entire_entity() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesAllTypes.ToListAsync(); - var entity = query.Single(); - entity.Reference.TestInt32 = 32; - entity.Reference.TestInt64 = 64; - entity.Collection[0].TestInt32 = 32; - entity.Collection[0].TestInt64 = 64; - - ClearLog(); - await context.SaveChangesAsync(); - }, - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(32, result.Reference.TestInt32); - Assert.Equal(64, result.Reference.TestInt64); - Assert.Equal(32, result.Collection[0].TestInt32); - Assert.Equal(64, result.Collection[0].TestInt64); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(); + entity.Reference.TestInt32 = 32; + entity.Reference.TestInt64 = 64; + entity.Collection[0].TestInt32 = 32; + entity.Collection[0].TestInt64 = 64; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(32, result.Reference.TestInt32); + Assert.Equal(64, result.Reference.TestInt64); + Assert.Equal(32, result.Collection[0].TestInt32); + Assert.Equal(64, result.Collection[0].TestInt64); + }); [ConditionalFact] public virtual Task Edit_a_scalar_property_and_reference_navigation_on_the_same_entity() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesBasic.ToListAsync(); - var entity = query.Single(); - entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 123.532M; - entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf = null; - await context.SaveChangesAsync(); - }, - - async context => - { - var query = await context.JsonEntitiesBasic.ToListAsync(); - var entity = query.Single(); - entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 523.532M; - entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "edit" }; - - ClearLog(); - await context.SaveChangesAsync(); - }, - - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(523.532M, result.OwnedReferenceRoot.OwnedReferenceBranch.Fraction); - Assert.Equal("edit", result.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesBasic.ToListAsync(); + var entity = query.Single(); + entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 123.532M; + entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf = null; + await context.SaveChangesAsync(); + }, + async context => + { + var query = await context.JsonEntitiesBasic.ToListAsync(); + var entity = query.Single(); + entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 523.532M; + entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf = new JsonOwnedLeaf { SomethingSomething = "edit" }; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(523.532M, result.OwnedReferenceRoot.OwnedReferenceBranch.Fraction); + Assert.Equal("edit", result.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething); + }); [ConditionalFact] public virtual Task Edit_a_scalar_property_and_collection_navigation_on_the_same_entity() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesBasic.ToListAsync(); - var entity = query.Single(); - entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 123.532M; - entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf = null; - await context.SaveChangesAsync(); - }, - - async context => - { - var query = await context.JsonEntitiesBasic.ToListAsync(); - var entity = query.Single(); - entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 523.532M; - entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf = new List - { - new JsonOwnedLeaf { SomethingSomething = "edit" } - }; - - ClearLog(); - await context.SaveChangesAsync(); - }, - - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(523.532M, result.OwnedReferenceRoot.OwnedReferenceBranch.Fraction); - Assert.Equal("edit", result.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf[0].SomethingSomething); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesBasic.ToListAsync(); + var entity = query.Single(); + entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 123.532M; + entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf = null; + await context.SaveChangesAsync(); + }, + async context => + { + var query = await context.JsonEntitiesBasic.ToListAsync(); + var entity = query.Single(); + entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 523.532M; + entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf = new List + { + new() { SomethingSomething = "edit" } + }; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(523.532M, result.OwnedReferenceRoot.OwnedReferenceBranch.Fraction); + Assert.Equal("edit", result.OwnedReferenceRoot.OwnedReferenceBranch.OwnedCollectionLeaf[0].SomethingSomething); + }); [ConditionalFact] public virtual Task Edit_a_scalar_property_and_another_property_behind_reference_navigation_on_the_same_entity() - => TestHelpers.ExecuteWithStrategyInTransactionAsync( - CreateContext, - UseTransaction, - async context => - { - var query = await context.JsonEntitiesBasic.ToListAsync(); - var entity = query.Single(); - entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 523.532M; - entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething = "edit"; - - ClearLog(); - await context.SaveChangesAsync(); - }, - - async context => - { - var result = await context.Set().SingleAsync(); - Assert.Equal(523.532M, result.OwnedReferenceRoot.OwnedReferenceBranch.Fraction); - Assert.Equal("edit", result.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething); - }); + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesBasic.ToListAsync(); + var entity = query.Single(); + entity.OwnedReferenceRoot.OwnedReferenceBranch.Fraction = 523.532M; + entity.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething = "edit"; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(); + Assert.Equal(523.532M, result.OwnedReferenceRoot.OwnedReferenceBranch.Fraction); + Assert.Equal("edit", result.OwnedReferenceRoot.OwnedReferenceBranch.OwnedReferenceLeaf.SomethingSomething); + }); public void UseTransaction(DatabaseFacade facade, IDbContextTransaction transaction) => facade.UseTransaction(transaction.GetDbTransaction()); diff --git a/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationFixtureBase.cs index dded2cd88b3..c5c884f7b2d 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationFixtureBase.cs @@ -60,14 +60,36 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con protected override void Seed(StoreValueGenerationContext context) { - context.WithSomeDatabaseGenerated.AddRange(new() { Data2 = 1 }, new() { Data2 = 2 }); - context.WithSomeDatabaseGenerated2.AddRange(new() { Data2 = 1 }, new() { Data2 = 2 }); - - context.WithNoDatabaseGenerated.AddRange(new() { Id = 1, Data1 = 10, Data2 = 20 }, new() { Id = 2, Data1 = 11, Data2 = 21 }); - context.WithNoDatabaseGenerated2.AddRange(new() { Id = 1, Data1 = 10, Data2 = 20 }, new() { Id = 2, Data1 = 11, Data2 = 21 }); - - context.WithAllDatabaseGenerated.AddRange(new(), new()); - context.WithAllDatabaseGenerated2.AddRange(new(), new()); + context.WithSomeDatabaseGenerated.AddRange(new StoreValueGenerationData { Data2 = 1 }, new StoreValueGenerationData { Data2 = 2 }); + context.WithSomeDatabaseGenerated2.AddRange(new StoreValueGenerationData { Data2 = 1 }, new StoreValueGenerationData { Data2 = 2 }); + + context.WithNoDatabaseGenerated.AddRange( + new StoreValueGenerationData + { + Id = 1, + Data1 = 10, + Data2 = 20 + }, new StoreValueGenerationData + { + Id = 2, + Data1 = 11, + Data2 = 21 + }); + context.WithNoDatabaseGenerated2.AddRange( + new StoreValueGenerationData + { + Id = 1, + Data1 = 10, + Data2 = 20 + }, new StoreValueGenerationData + { + Id = 2, + Data1 = 11, + Data2 = 21 + }); + + context.WithAllDatabaseGenerated.AddRange(new StoreValueGenerationData(), new StoreValueGenerationData()); + context.WithAllDatabaseGenerated2.AddRange(new StoreValueGenerationData(), new StoreValueGenerationData()); context.SaveChanges(); } diff --git a/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationTestBase.cs b/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationTestBase.cs index dfedb075641..3d0d411fe6f 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationTestBase.cs @@ -174,7 +174,12 @@ protected virtual async Task Test( firstDbSet.Add(first); break; case GeneratedValues.None: - first = new StoreValueGenerationData { Id = 100, Data1 = 1000, Data2 = 1000 }; + first = new StoreValueGenerationData + { + Id = 100, + Data1 = 1000, + Data2 = 1000 + }; firstDbSet.Add(first); break; case GeneratedValues.All: @@ -184,6 +189,7 @@ protected virtual async Task Test( default: throw new ArgumentOutOfRangeException(nameof(generatedValues)); } + break; case EntityState.Modified: @@ -200,6 +206,7 @@ protected virtual async Task Test( default: throw new ArgumentOutOfRangeException(nameof(generatedValues)); } + break; case EntityState.Deleted: @@ -216,6 +223,7 @@ protected virtual async Task Test( default: throw new ArgumentOutOfRangeException(nameof(generatedValues)); } + break; default: @@ -232,7 +240,12 @@ protected virtual async Task Test( secondDbSet!.Add(second); break; case GeneratedValues.None: - second = new StoreValueGenerationData { Id = 101, Data1 = 1001, Data2 = 1001 }; + second = new StoreValueGenerationData + { + Id = 101, + Data1 = 1001, + Data2 = 1001 + }; secondDbSet!.Add(second); break; case GeneratedValues.All: @@ -242,6 +255,7 @@ protected virtual async Task Test( default: throw new ArgumentOutOfRangeException(nameof(generatedValues)); } + break; case EntityState.Modified: @@ -258,6 +272,7 @@ protected virtual async Task Test( default: throw new ArgumentOutOfRangeException(nameof(generatedValues)); } + break; case EntityState.Deleted: @@ -274,6 +289,7 @@ protected virtual async Task Test( default: throw new ArgumentOutOfRangeException(nameof(generatedValues)); } + break; case null: @@ -331,7 +347,7 @@ protected virtual async Task Test( } /// - /// Providers can override this to specify when should create a transaction, and when not. + /// Providers can override this to specify when should create a transaction, and when not. /// By default, it's assumed that multiple updates always require a transaction, whereas a single update never does. /// protected virtual bool ShouldCreateImplicitTransaction( diff --git a/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateFixtureBase.cs index ea5621967f1..dfa204c5d1e 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateFixtureBase.cs @@ -142,20 +142,20 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con }); modelBuilder.SharedTypeEntity( - nameof(StoredProcedureUpdateContext.WithUserManagedConcurrencyToken), - b => - { - b.Property(e => e.AdditionalProperty).IsConcurrencyToken(); - - b.UpdateUsingStoredProcedure( - nameof(StoredProcedureUpdateContext.WithUserManagedConcurrencyToken) + "_Update", - spb => spb - .HasOriginalValueParameter(w => w.Id) - .HasOriginalValueParameter(w => w.AdditionalProperty, pb => pb.HasName("ConcurrencyTokenOriginal")) - .HasParameter(w => w.Name) - .HasParameter(w => w.AdditionalProperty, pb => pb.HasName("ConcurrencyTokenCurrent")) - .HasRowsAffectedParameter()); - }); + nameof(StoredProcedureUpdateContext.WithUserManagedConcurrencyToken), + b => + { + b.Property(e => e.AdditionalProperty).IsConcurrencyToken(); + + b.UpdateUsingStoredProcedure( + nameof(StoredProcedureUpdateContext.WithUserManagedConcurrencyToken) + "_Update", + spb => spb + .HasOriginalValueParameter(w => w.Id) + .HasOriginalValueParameter(w => w.AdditionalProperty, pb => pb.HasName("ConcurrencyTokenOriginal")) + .HasParameter(w => w.Name) + .HasParameter(w => w.AdditionalProperty, pb => pb.HasName("ConcurrencyTokenCurrent")) + .HasRowsAffectedParameter()); + }); modelBuilder.SharedTypeEntity(nameof(StoredProcedureUpdateContext.WithOriginalAndCurrentValueOnNonConcurrencyToken)) .UpdateUsingStoredProcedure( diff --git a/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateTestBase.cs b/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateTestBase.cs index fd542ce294d..6a7abce9896 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateTestBase.cs @@ -451,8 +451,7 @@ public virtual async Task User_managed_concurrency_token(bool async) var entity1 = new EntityWithAdditionalProperty { - Name = "Initial", - AdditionalProperty = 8 // The concurrency token + Name = "Initial", AdditionalProperty = 8 // The concurrency token }; context1.WithUserManagedConcurrencyToken.Add(entity1); @@ -481,10 +480,7 @@ public virtual async Task Original_and_current_value_on_non_concurrency_token(bo { await using var context = CreateContext(); - var entity = new Entity - { - Name = "Initial", - }; + var entity = new Entity { Name = "Initial" }; context.WithOriginalAndCurrentValueOnNonConcurrencyToken.Add(entity); await context.SaveChangesAsync(); diff --git a/test/EFCore.Relational.Specification.Tests/UpdatesRelationalTestBase.cs b/test/EFCore.Relational.Specification.Tests/UpdatesRelationalTestBase.cs index 2553227b87e..82e9f637e03 100644 --- a/test/EFCore.Relational.Specification.Tests/UpdatesRelationalTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/UpdatesRelationalTestBase.cs @@ -87,7 +87,7 @@ public virtual void Save_with_shared_foreign_key() { var product = context.ProductWithBytes.Find(productId)!; var category = new SpecialCategory { PrincipalId = 777 }; - var productCategory = new ProductCategory() { Category = category }; + var productCategory = new ProductCategory { Category = category }; product.ProductCategories = new List { productCategory }; context.SaveChanges(); diff --git a/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.Json.cs b/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.Json.cs index 69953fd85a4..bab798a7d0b 100644 --- a/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.Json.cs +++ b/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.Json.cs @@ -1,123 +1,136 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.EntityFrameworkCore.Infrastructure +namespace Microsoft.EntityFrameworkCore.Infrastructure; + +public partial class RelationalModelValidatorTest { - public partial class RelationalModelValidatorTest + [ConditionalFact] + public void Throw_when_non_json_entity_is_the_owner_of_json_entity_ref_ref() { - [ConditionalFact] - public void Throw_when_non_json_entity_is_the_owner_of_json_entity_ref_ref() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.Ignore(x => x.NestedCollection); - bb.OwnsOne(x => x.NestedReference, bbb => bbb.ToJson("reference_reference")); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.Ignore(x => x.NestedCollection); + bb.OwnsOne(x => x.NestedReference, bbb => bbb.ToJson("reference_reference")); + }); b.Ignore(x => x.OwnedCollection); }); - VerifyError( - RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( - nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonEntityBasic)), - modelBuilder); - } - - [ConditionalFact] - public void Throw_when_non_json_entity_is_the_owner_of_json_entity_ref_col() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( + nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonEntityBasic)), + modelBuilder); + } + + [ConditionalFact] + public void Throw_when_non_json_entity_is_the_owner_of_json_entity_ref_col() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.OwnsMany(x => x.NestedCollection, bbb => bbb.ToJson("reference_collection")); - bb.Ignore(x => x.NestedReference); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.OwnsMany(x => x.NestedCollection, bbb => bbb.ToJson("reference_collection")); + bb.Ignore(x => x.NestedReference); + }); b.Ignore(x => x.OwnedCollection); }); - VerifyError( - RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( - nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonEntityBasic)), - modelBuilder); - } - - [ConditionalFact] - public void Throw_when_non_json_entity_is_the_owner_of_json_entity_col_ref() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( + nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonEntityBasic)), + modelBuilder); + } + + [ConditionalFact] + public void Throw_when_non_json_entity_is_the_owner_of_json_entity_col_ref() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsMany(x => x.OwnedCollection, bb => - { - bb.Ignore(x => x.NestedCollection); - bb.OwnsOne(x => x.NestedReference, bbb => bbb.ToJson("collection_reference")); - }); + b.OwnsMany( + x => x.OwnedCollection, bb => + { + bb.Ignore(x => x.NestedCollection); + bb.OwnsOne(x => x.NestedReference, bbb => bbb.ToJson("collection_reference")); + }); b.Ignore(x => x.OwnedReference); }); - VerifyError( - RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( - nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonOwnedRoot)), - modelBuilder); - } - - [ConditionalFact] - public void Throw_when_non_json_entity_is_the_owner_of_json_entity_col_col() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( + nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonOwnedRoot)), + modelBuilder); + } + + [ConditionalFact] + public void Throw_when_non_json_entity_is_the_owner_of_json_entity_col_col() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsMany(x => x.OwnedCollection, bb => - { - bb.Ignore(x => x.NestedReference); - bb.OwnsMany(x => x.NestedCollection, bbb => bbb.ToJson("collection_collection")); - }); + b.OwnsMany( + x => x.OwnedCollection, bb => + { + bb.Ignore(x => x.NestedReference); + bb.OwnsMany(x => x.NestedCollection, bbb => bbb.ToJson("collection_collection")); + }); b.Ignore(x => x.OwnedReference); }); - VerifyError( - RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( - nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonOwnedRoot)), - modelBuilder); - } - - [ConditionalFact] - public void Throw_when_json_entity_references_another_non_json_entity_via_reference() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityOwnedByNonJsonOwnedType( + nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonOwnedRoot)), + modelBuilder); + } + + [ConditionalFact] + public void Throw_when_json_entity_references_another_non_json_entity_via_reference() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity(); + modelBuilder.Entity( + b => { - b.OwnsOne(x => x.Owned, bb => - { - bb.ToJson("reference"); - bb.HasOne(x => x.Reference).WithOne().HasForeignKey(x => x.Fk); - }); + b.OwnsOne( + x => x.Owned, bb => + { + bb.ToJson("reference"); + bb.HasOne(x => x.Reference).WithOne().HasForeignKey(x => x.Fk); + }); }); - VerifyError( - RelationalStrings.JsonEntityReferencingRegularEntity(nameof(ValidatorJsonOwnedReferencingRegularEntity)), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityReferencingRegularEntity(nameof(ValidatorJsonOwnedReferencingRegularEntity)), + modelBuilder); + } - [ConditionalFact] - public void Tpt_not_supported_for_owner_of_json_entity_on_base() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Tpt_not_supported_for_owner_of_json_entity_on_base() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.ToTable("Table1"); - b.OwnsOne(x => x.ReferenceOnBase, bb => - { - bb.ToJson("reference"); - }); + b.OwnsOne( + x => x.ReferenceOnBase, bb => + { + bb.ToJson("reference"); + }); }); - modelBuilder.Entity(b => + modelBuilder.Entity( + b => { b.HasBaseType(); b.ToTable("Table2"); @@ -125,125 +138,136 @@ public void Tpt_not_supported_for_owner_of_json_entity_on_base() b.Ignore(x => x.CollectionOnDerived); }); - VerifyError( - RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), + modelBuilder); + } - [ConditionalFact] - public void Tpt_not_supported_for_owner_of_json_entity_on_derived() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Tpt_not_supported_for_owner_of_json_entity_on_derived() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.ToTable("Table1"); b.Ignore(x => x.ReferenceOnBase); }); - modelBuilder.Entity(b => + modelBuilder.Entity( + b => { b.ToTable("Table2"); b.OwnsOne(x => x.ReferenceOnDerived, bb => bb.ToJson("reference")); b.Ignore(x => x.CollectionOnDerived); }); - VerifyError( - RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), + modelBuilder); + } - [ConditionalFact] - public void Tpt_not_supported_for_owner_of_json_entity_mapping_strategy_explicitly_defined() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Tpt_not_supported_for_owner_of_json_entity_mapping_strategy_explicitly_defined() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.UseTptMappingStrategy(); - b.OwnsOne(x => x.ReferenceOnBase, bb => - { - bb.ToJson("reference"); - }); + b.OwnsOne( + x => x.ReferenceOnBase, bb => + { + bb.ToJson("reference"); + }); }); - modelBuilder.Entity(b => + modelBuilder.Entity( + b => { b.HasBaseType(); b.Ignore(x => x.ReferenceOnDerived); b.Ignore(x => x.CollectionOnDerived); }); - VerifyError( - RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), + modelBuilder); + } - [ConditionalFact] - public void Tpt_not_supported_for_owner_of_json_entity_same_table_names_different_schemas() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Tpt_not_supported_for_owner_of_json_entity_same_table_names_different_schemas() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.ToTable("Table", "mySchema1"); b.Ignore(x => x.ReferenceOnBase); }); - modelBuilder.Entity(b => + modelBuilder.Entity( + b => { b.ToTable("Table", "mySchema2"); b.OwnsOne(x => x.ReferenceOnDerived, bb => bb.ToJson("reference")); b.Ignore(x => x.CollectionOnDerived); }); - VerifyError( - RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), + modelBuilder); + } - [ConditionalFact] - public void Tpc_not_supported_for_owner_of_json_entity() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity().UseTpcMappingStrategy(); - modelBuilder.Entity(); - modelBuilder.Entity(b => b.Ignore(x => x.ReferenceOnBase)); + [ConditionalFact] + public void Tpc_not_supported_for_owner_of_json_entity() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity().UseTpcMappingStrategy(); + modelBuilder.Entity(); + modelBuilder.Entity(b => b.Ignore(x => x.ReferenceOnBase)); - modelBuilder.Entity(b => + modelBuilder.Entity( + b => { b.OwnsOne(x => x.ReferenceOnDerived, bb => bb.ToJson("reference")); b.Ignore(x => x.CollectionOnDerived); }); - VerifyError( - RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithNonTphInheritanceOnOwner(nameof(ValidatorJsonEntityInheritanceBase)), + modelBuilder); + } - [ConditionalFact] - public void Json_entity_not_mapped_to_table_or_a_view_is_not_supported() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Json_entity_not_mapped_to_table_or_a_view_is_not_supported() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.ToTable((string)null); - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.ToJson("reference"); - bb.Ignore(x => x.NestedReference); - bb.Ignore(x => x.NestedCollection); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.ToJson("reference"); + bb.Ignore(x => x.NestedReference); + bb.Ignore(x => x.NestedCollection); + }); b.Ignore(x => x.OwnedCollection); }); - VerifyError( - RelationalStrings.JsonEntityWithOwnerNotMappedToTableOrView(nameof(ValidatorJsonEntityBasic)), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithOwnerNotMappedToTableOrView(nameof(ValidatorJsonEntityBasic)), + modelBuilder); + } - [ConditionalFact] - public void Json_multiple_json_entities_mapped_to_the_same_column() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Json_multiple_json_entities_mapped_to_the_same_column() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.OwnsOne(x => x.Reference1, bb => bb.ToJson("json")); b.OwnsOne(x => x.Reference2, bb => bb.ToJson("json")); @@ -251,294 +275,311 @@ public void Json_multiple_json_entities_mapped_to_the_same_column() b.Ignore(x => x.Collection2); }); - VerifyError( - RelationalStrings.JsonEntityMultipleRootsMappedToTheSameJsonColumn( - "json", nameof(ValidatorJsonEntitySideBySide)), - modelBuilder); - } - - [ConditionalFact] - public void Json_entity_with_defalt_value_on_a_property() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityMultipleRootsMappedToTheSameJsonColumn( + "json", nameof(ValidatorJsonEntitySideBySide)), + modelBuilder); + } + + [ConditionalFact] + public void Json_entity_with_defalt_value_on_a_property() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.Ignore(x => x.OwnedCollection); - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.Ignore(x => x.NestedReference); - bb.Ignore(x => x.NestedCollection); - bb.ToJson("json"); - bb.Property(x => x.Name).HasDefaultValue("myDefault"); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.Ignore(x => x.NestedReference); + bb.Ignore(x => x.NestedCollection); + bb.ToJson("json"); + bb.Property(x => x.Name).HasDefaultValue("myDefault"); + }); }); - VerifyError(RelationalStrings.JsonEntityWithDefaultValueSetOnItsProperty("ValidatorJsonOwnedRoot", "Name"), modelBuilder); - } + VerifyError(RelationalStrings.JsonEntityWithDefaultValueSetOnItsProperty("ValidatorJsonOwnedRoot", "Name"), modelBuilder); + } - [ConditionalFact] - public void Json_entity_with_table_splitting_throws() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Json_entity_with_table_splitting_throws() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.ToTable("SharedTable"); - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.ToJson("json"); - bb.OwnsOne(x => x.NestedReference); - bb.OwnsMany(x => x.NestedCollection); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.ToJson("json"); + bb.OwnsOne(x => x.NestedReference); + bb.OwnsMany(x => x.NestedCollection); + }); b.Ignore(x => x.OwnedCollection); }); - modelBuilder.Entity(b => + modelBuilder.Entity( + b => { b.ToTable("SharedTable"); b.HasOne(x => x.Link).WithOne().HasForeignKey(x => x.Id); }); - VerifyError( - RelationalStrings.JsonEntityWithTableSplittingIsNotSupported, - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithTableSplittingIsNotSupported, + modelBuilder); + } - [ConditionalFact] - public void Json_entity_with_explicit_ordinal_key_on_collection_throws() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Json_entity_with_explicit_ordinal_key_on_collection_throws() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsMany(x => x.OwnedCollection, bb => - { - bb.ToJson("json"); - bb.HasKey(x => x.Ordinal); - }); + b.OwnsMany( + x => x.OwnedCollection, bb => + { + bb.ToJson("json"); + bb.HasKey(x => x.Ordinal); + }); }); - VerifyError(RelationalStrings.JsonEntityWithExplicitlyConfiguredOrdinalKey("ValidatorJsonOwnedExplicitOrdinal"), modelBuilder); - } + VerifyError(RelationalStrings.JsonEntityWithExplicitlyConfiguredOrdinalKey("ValidatorJsonOwnedExplicitOrdinal"), modelBuilder); + } - [ConditionalFact] - public void Json_entity_with_key_having_json_property_name_configured_explicitly_throws() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Json_entity_with_key_having_json_property_name_configured_explicitly_throws() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsMany(x => x.OwnedCollection, bb => - { - bb.ToJson("json"); - bb.HasKey(x => x.Ordinal); - bb.Property(x => x.Ordinal).HasJsonPropertyName("Foo"); - }); + b.OwnsMany( + x => x.OwnedCollection, bb => + { + bb.ToJson("json"); + bb.HasKey(x => x.Ordinal); + bb.Property(x => x.Ordinal).HasJsonPropertyName("Foo"); + }); }); - VerifyError( - RelationalStrings.JsonEntityWithExplicitlyConfiguredJsonPropertyNameOnKey( - nameof(ValidatorJsonOwnedExplicitOrdinal.Ordinal), nameof(ValidatorJsonOwnedExplicitOrdinal)), - modelBuilder); - } - - [ConditionalFact] - public void Json_entity_with_multiple_properties_mapped_to_same_json_name() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityWithExplicitlyConfiguredJsonPropertyNameOnKey( + nameof(ValidatorJsonOwnedExplicitOrdinal.Ordinal), nameof(ValidatorJsonOwnedExplicitOrdinal)), + modelBuilder); + } + + [ConditionalFact] + public void Json_entity_with_multiple_properties_mapped_to_same_json_name() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.Property(x => x.Name).HasJsonPropertyName("Foo"); - bb.Property(x => x.Number).HasJsonPropertyName("Foo"); - bb.ToJson("reference"); - bb.Ignore(x => x.NestedReference); - bb.Ignore(x => x.NestedCollection); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.Property(x => x.Name).HasJsonPropertyName("Foo"); + bb.Property(x => x.Number).HasJsonPropertyName("Foo"); + bb.ToJson("reference"); + bb.Ignore(x => x.NestedReference); + bb.Ignore(x => x.NestedCollection); + }); b.Ignore(x => x.OwnedCollection); }); - VerifyError(RelationalStrings.JsonEntityWithMultiplePropertiesMappedToSameJsonProperty("ValidatorJsonOwnedRoot", "Foo"), - modelBuilder); - } + VerifyError( + RelationalStrings.JsonEntityWithMultiplePropertiesMappedToSameJsonProperty("ValidatorJsonOwnedRoot", "Foo"), + modelBuilder); + } - [ConditionalFact] - public void Json_entity_with_property_and_navigation_mapped_to_same_json_name() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + [ConditionalFact] + public void Json_entity_with_property_and_navigation_mapped_to_same_json_name() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.Property(x => x.Name); - bb.Property(x => x.Number); - bb.ToJson("reference"); - bb.OwnsOne(x => x.NestedReference, bbb => bbb.HasJsonPropertyName("Name")); - bb.Ignore(x => x.NestedCollection); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.Property(x => x.Name); + bb.Property(x => x.Number); + bb.ToJson("reference"); + bb.OwnsOne(x => x.NestedReference, bbb => bbb.HasJsonPropertyName("Name")); + bb.Ignore(x => x.NestedCollection); + }); b.Ignore(x => x.OwnedCollection); }); - VerifyError( - RelationalStrings.JsonEntityWithMultiplePropertiesMappedToSameJsonProperty( - nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonOwnedRoot.Name)), - modelBuilder); - } - - [ConditionalFact] - public void Json_on_base_and_derived_mapped_to_same_column_throws() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity().OwnsOne(x => x.ReferenceOnBase, b => b.ToJson("jsonColumn")); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityWithMultiplePropertiesMappedToSameJsonProperty( + nameof(ValidatorJsonOwnedRoot), nameof(ValidatorJsonOwnedRoot.Name)), + modelBuilder); + } + + [ConditionalFact] + public void Json_on_base_and_derived_mapped_to_same_column_throws() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity().OwnsOne(x => x.ReferenceOnBase, b => b.ToJson("jsonColumn")); + modelBuilder.Entity( + b => { b.HasBaseType(); b.OwnsOne(x => x.ReferenceOnDerived, bb => bb.ToJson("jsonColumn")); b.Ignore(x => x.CollectionOnDerived); }); - VerifyError( - RelationalStrings.JsonEntityMultipleRootsMappedToTheSameJsonColumn( - "jsonColumn", nameof(ValidatorJsonEntityInheritanceBase)), - modelBuilder); - } - - [ConditionalFact] - public void Json_entity_mapped_to_different_view_than_its_root_aggregate() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityMultipleRootsMappedToTheSameJsonColumn( + "jsonColumn", nameof(ValidatorJsonEntityInheritanceBase)), + modelBuilder); + } + + [ConditionalFact] + public void Json_entity_mapped_to_different_view_than_its_root_aggregate() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.ToView("MyView"); - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.ToJson(); - bb.ToView("MyOtherView"); - bb.Ignore(x => x.NestedReference); - bb.Ignore(x => x.NestedCollection); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.ToJson(); + bb.ToView("MyOtherView"); + bb.Ignore(x => x.NestedReference); + bb.Ignore(x => x.NestedCollection); + }); b.Ignore(x => x.OwnedCollection); }); - VerifyError( - RelationalStrings.JsonEntityMappedToDifferentViewThanOwner( - nameof(ValidatorJsonOwnedRoot), "MyOtherView", nameof(ValidatorJsonEntityBasic), "MyView"), - modelBuilder); - } - - [ConditionalFact] - public void Json_entity_mapped_to_different_view_than_its_parent() - { - var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => + VerifyError( + RelationalStrings.JsonEntityMappedToDifferentViewThanOwner( + nameof(ValidatorJsonOwnedRoot), "MyOtherView", nameof(ValidatorJsonEntityBasic), "MyView"), + modelBuilder); + } + + [ConditionalFact] + public void Json_entity_mapped_to_different_view_than_its_parent() + { + var modelBuilder = CreateConventionModelBuilder(); + modelBuilder.Entity( + b => { b.ToView("MyView"); - b.OwnsOne(x => x.OwnedReference, bb => - { - bb.ToJson(); - bb.ToView("MyView"); - bb.OwnsMany(x => x.NestedCollection, bbb => bbb.ToView("MyOtherView")); - bb.Ignore(x => x.NestedReference); - }); + b.OwnsOne( + x => x.OwnedReference, bb => + { + bb.ToJson(); + bb.ToView("MyView"); + bb.OwnsMany(x => x.NestedCollection, bbb => bbb.ToView("MyOtherView")); + bb.Ignore(x => x.NestedReference); + }); b.Ignore(x => x.OwnedCollection); }); - VerifyError( - RelationalStrings.JsonEntityMappedToDifferentViewThanOwner( - nameof(ValidatorJsonOwnedBranch), "MyOtherView", nameof(ValidatorJsonOwnedRoot), "MyView"), - modelBuilder); - } - - private class ValidatorJsonEntityBasic - { - public int Id { get; set; } - public ValidatorJsonOwnedRoot OwnedReference { get; set; } - public List OwnedCollection { get; set; } - } - - private abstract class ValidatorJsonEntityInheritanceAbstract : ValidatorJsonEntityInheritanceBase - { - public Guid Guid { get; set; } - } - - private class ValidatorJsonEntityInheritanceBase - { - public int Id { get; set; } - public string Name { get; set; } - public ValidatorJsonOwnedBranch ReferenceOnBase { get; set; } - - } - - private class ValidatorJsonEntityInheritanceDerived : ValidatorJsonEntityInheritanceAbstract - { - public bool Switch { get; set; } - - public ValidatorJsonOwnedBranch ReferenceOnDerived { get; set; } - - public List CollectionOnDerived { get; set; } - } - - private class ValidatorJsonOwnedRoot - { - public string Name { get; set; } - public int Number { get; set; } - - public ValidatorJsonOwnedBranch NestedReference { get; set; } - public List NestedCollection { get; set; } - } - - private class ValidatorJsonOwnedBranch - { - public double Number { get; set; } - } - - private class ValidatorJsonEntityExplicitOrdinal - { - public int Id { get; set; } - - public string Name { get; set; } - - public List OwnedCollection { get; set; } - } - - private class ValidatorJsonOwnedExplicitOrdinal - { - public int Ordinal { get; set; } - public DateTime Date { get; set; } - } - - private class ValidatorJsonEntityJsonReferencingRegularEntity - { - public int Id { get; set; } - public ValidatorJsonOwnedReferencingRegularEntity Owned { get; set; } - } - - private class ValidatorJsonOwnedReferencingRegularEntity - { - public string Foo { get; set; } - - public int? Fk { get; set; } - public ValidatorJsonEntityReferencedEntity Reference { get; set; } - } - - private class ValidatorJsonEntityReferencedEntity - { - public int Id { get; set; } - public DateTime Date { get; set; } - } - - private class ValidatorJsonEntitySideBySide - { - public int Id { get; set; } - public string Name { get; set; } - public ValidatorJsonOwnedBranch Reference1 { get; set; } - public ValidatorJsonOwnedBranch Reference2 { get; set; } - public List Collection1 { get; set; } - public List Collection2 { get; set; } - } - - private class ValidatorJsonEntityTableSplitting - { - public int Id { get; set; } - public ValidatorJsonEntityBasic Link { get; set; } - } + VerifyError( + RelationalStrings.JsonEntityMappedToDifferentViewThanOwner( + nameof(ValidatorJsonOwnedBranch), "MyOtherView", nameof(ValidatorJsonOwnedRoot), "MyView"), + modelBuilder); + } + + private class ValidatorJsonEntityBasic + { + public int Id { get; set; } + public ValidatorJsonOwnedRoot OwnedReference { get; set; } + public List OwnedCollection { get; set; } + } + + private abstract class ValidatorJsonEntityInheritanceAbstract : ValidatorJsonEntityInheritanceBase + { + public Guid Guid { get; set; } + } + + private class ValidatorJsonEntityInheritanceBase + { + public int Id { get; set; } + public string Name { get; set; } + public ValidatorJsonOwnedBranch ReferenceOnBase { get; set; } + } + + private class ValidatorJsonEntityInheritanceDerived : ValidatorJsonEntityInheritanceAbstract + { + public bool Switch { get; set; } + + public ValidatorJsonOwnedBranch ReferenceOnDerived { get; set; } + + public List CollectionOnDerived { get; set; } + } + + private class ValidatorJsonOwnedRoot + { + public string Name { get; set; } + public int Number { get; set; } + + public ValidatorJsonOwnedBranch NestedReference { get; set; } + public List NestedCollection { get; set; } + } + + private class ValidatorJsonOwnedBranch + { + public double Number { get; set; } + } + + private class ValidatorJsonEntityExplicitOrdinal + { + public int Id { get; set; } + + public string Name { get; set; } + + public List OwnedCollection { get; set; } + } + + private class ValidatorJsonOwnedExplicitOrdinal + { + public int Ordinal { get; set; } + public DateTime Date { get; set; } + } + + private class ValidatorJsonEntityJsonReferencingRegularEntity + { + public int Id { get; set; } + public ValidatorJsonOwnedReferencingRegularEntity Owned { get; set; } + } + + private class ValidatorJsonOwnedReferencingRegularEntity + { + public string Foo { get; set; } + + public int? Fk { get; set; } + public ValidatorJsonEntityReferencedEntity Reference { get; set; } + } + + private class ValidatorJsonEntityReferencedEntity + { + public int Id { get; set; } + public DateTime Date { get; set; } + } + + private class ValidatorJsonEntitySideBySide + { + public int Id { get; set; } + public string Name { get; set; } + public ValidatorJsonOwnedBranch Reference1 { get; set; } + public ValidatorJsonOwnedBranch Reference2 { get; set; } + public List Collection1 { get; set; } + public List Collection2 { get; set; } + } + + private class ValidatorJsonEntityTableSplitting + { + public int Id { get; set; } + public ValidatorJsonEntityBasic Link { get; set; } } } diff --git a/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.cs b/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.cs index 16a0f36f3f9..81360d1df89 100644 --- a/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.cs +++ b/test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.cs @@ -738,11 +738,12 @@ public virtual void Detects_entity_splitting_without_properties() public virtual void Detects_entity_splitting_to_table_with_all_properties() { var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity().SplitToTable("AnimalDetails", s => - { - s.Property(a => a.Name); - s.Property("FavoritePersonId"); - }); + modelBuilder.Entity().SplitToTable( + "AnimalDetails", s => + { + s.Property(a => a.Name); + s.Property("FavoritePersonId"); + }); VerifyError( RelationalStrings.EntitySplittingMissingPropertiesMainFragment(nameof(Animal), "Animal"), @@ -753,11 +754,12 @@ public virtual void Detects_entity_splitting_to_table_with_all_properties() public virtual void Detects_entity_splitting_to_view_with_all_properties() { var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity().ToView("Animal").SplitToView("AnimalDetails", s => - { - s.Property(a => a.Name); - s.Property("FavoritePersonId"); - }); + modelBuilder.Entity().ToView("Animal").SplitToView( + "AnimalDetails", s => + { + s.Property(a => a.Name); + s.Property("FavoritePersonId"); + }); VerifyError( RelationalStrings.EntitySplittingMissingPropertiesMainFragment(nameof(Animal), "Animal"), @@ -855,7 +857,7 @@ public virtual void Detects_unmapped_foreign_keys_in_entity_splitting() modelBuilder.Entity( pb => { - pb.HasKey(p => new {p.Id, p.Name}); + pb.HasKey(p => new { p.Id, p.Name }); }); modelBuilder.Entity().ToTable("Cat") .HasOne().WithMany() @@ -2193,8 +2195,7 @@ public virtual void Detects_store_generated_PK_in_TPC() RelationalResources.LogTpcStoreGeneratedIdentity(new TestLogger()); VerifyWarning( definition.GenerateMessage(nameof(Animal), nameof(Animal.Id)), - modelBuilder, - LogLevel.Warning); + modelBuilder); } [ConditionalFact] @@ -2209,7 +2210,8 @@ public virtual void Detects_table_sharing_with_TPC_on_dependent() modelBuilder.Entity().ToTable("Animal").UseTpcMappingStrategy(); modelBuilder.Entity().ToTable("Employee"); - VerifyError(RelationalStrings.TpcTableSharingDependent("Person", "Animal", "Employee", "Employee"), + VerifyError( + RelationalStrings.TpcTableSharingDependent("Person", "Animal", "Employee", "Employee"), modelBuilder); } @@ -2249,7 +2251,8 @@ public virtual void Detects_view_sharing_on_base_with_TPC() modelBuilder.Entity().ToView("Animal"); - VerifyError(RelationalStrings.TpcTableSharing("Person", "Animal", "Animal"), + VerifyError( + RelationalStrings.TpcTableSharing("Person", "Animal", "Animal"), modelBuilder); } @@ -2324,8 +2327,7 @@ public virtual void Detects_unmapped_foreign_keys_in_TPC() definition.MessageFormat, "{'FavoriteBreed'}", nameof(Person), nameof(Animal), nameof(Animal), nameof(Animal), nameof(Person), nameof(Animal))), - modelBuilder, - LogLevel.Warning); + modelBuilder); } [ConditionalFact] @@ -2630,9 +2632,11 @@ public void Detects_multiple_entity_types_mapped_to_the_same_stored_procedure() db => { db.HasBaseType((string)null); - db.OwnsOne(d => d.SomeTestMethods).DeleteUsingStoredProcedure("Delete", + db.OwnsOne(d => d.SomeTestMethods).DeleteUsingStoredProcedure( + "Delete", s => s.HasOriginalValueParameter("DerivedTestMethodsId")); - db.OwnsOne(d => d.OtherTestMethods).DeleteUsingStoredProcedure("Delete", + db.OwnsOne(d => d.OtherTestMethods).DeleteUsingStoredProcedure( + "Delete", s => s.HasOriginalValueParameter("DerivedTestMethodsId")); }); @@ -2651,9 +2655,10 @@ public virtual void Detects_keyless_entity_type_mapped_to_a_stored_procedure() modelBuilder.Entity() .Ignore(a => a.FavoritePerson) .HasNoKey() - .InsertUsingStoredProcedure(s => s - .HasParameter(c => c.Id) - .HasParameter(c => c.Name)); + .InsertUsingStoredProcedure( + s => s + .HasParameter(c => c.Id) + .HasParameter(c => c.Name)); VerifyError( RelationalStrings.StoredProcedureKeyless(nameof(Animal), "Animal_Insert"), @@ -2718,11 +2723,12 @@ public virtual void Detects_missing_generated_stored_procedure_parameters_in_TPH { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .UpdateUsingStoredProcedure("Update", s => s - .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) - .HasParameter(a => a.Name) - .HasParameter((Cat c) => c.Breed) - .HasResultColumn(a => a.Name)) + .UpdateUsingStoredProcedure( + "Update", s => s + .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) + .HasParameter(a => a.Name) + .HasParameter((Cat c) => c.Breed) + .HasResultColumn(a => a.Name)) .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save); modelBuilder.Entity(); @@ -2749,9 +2755,10 @@ public virtual void Detects_non_key_delete_stored_procedure_params_in_TPH() { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .DeleteUsingStoredProcedure(s => s - .HasOriginalValueParameter(a => a.Id) - .HasOriginalValueParameter(a => a.Name)) + .DeleteUsingStoredProcedure( + s => s + .HasOriginalValueParameter(a => a.Id) + .HasOriginalValueParameter(a => a.Name)) .Property(a => a.Name).ValueGeneratedOnUpdate(); VerifyError( @@ -2776,10 +2783,11 @@ public virtual void Detects_duplicate_parameter() { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .InsertUsingStoredProcedure(s => s - .HasParameter(a => a.Id, p => p.IsOutput()) - .HasRowsAffectedParameter(c => c.HasName("Id")) - .HasParameter("FavoritePersonId")); + .InsertUsingStoredProcedure( + s => s + .HasParameter(a => a.Id, p => p.IsOutput()) + .HasRowsAffectedParameter(c => c.HasName("Id")) + .HasParameter("FavoritePersonId")); VerifyError( RelationalStrings.StoredProcedureDuplicateParameterName("Id", "Animal_Insert"), @@ -2791,10 +2799,11 @@ public virtual void Detects_duplicate_result_column() { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .InsertUsingStoredProcedure(s => s - .HasResultColumn(a => a.Id, c => c.HasName("Id")) - .HasRowsAffectedResultColumn(c => c.HasName("Id")) - .HasParameter("FavoritePersonId")); + .InsertUsingStoredProcedure( + s => s + .HasResultColumn(a => a.Id, c => c.HasName("Id")) + .HasRowsAffectedResultColumn(c => c.HasName("Id")) + .HasParameter("FavoritePersonId")); VerifyError( RelationalStrings.StoredProcedureDuplicateResultColumnName("Id", "Animal_Insert"), @@ -2820,9 +2829,10 @@ public virtual void Detects_non_generated_update_stored_procedure_result_columns var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() .Ignore(a => a.FavoritePerson) - .UpdateUsingStoredProcedure(s => s - .HasOriginalValueParameter(a => a.Id) - .HasParameter(a => a.Name)) + .UpdateUsingStoredProcedure( + s => s + .HasOriginalValueParameter(a => a.Id) + .HasParameter(a => a.Name)) .UseTptMappingStrategy(); modelBuilder.Entity() .UpdateUsingStoredProcedure("Update", s => s.HasResultColumn(c => c.Breed)); @@ -2852,9 +2862,10 @@ public virtual void Detects_non_generated_update_stored_procedure_input_output_p var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() .Ignore(a => a.FavoritePerson) - .UpdateUsingStoredProcedure(s => s - .HasOriginalValueParameter(a => a.Id) - .HasParameter(a => a.Name, p => p.IsInputOutput())); + .UpdateUsingStoredProcedure( + s => s + .HasOriginalValueParameter(a => a.Id) + .HasParameter(a => a.Name, p => p.IsInputOutput())); VerifyError( RelationalStrings.StoredProcedureOutputParameterNotGenerated(nameof(Animal), nameof(Animal.Name), "Animal_Update"), @@ -2879,11 +2890,13 @@ public virtual void Detects_generated_properties_mapped_to_result_and_parameter( { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .UpdateUsingStoredProcedure(s => s - .HasOriginalValueParameter(a => a.Id) - .HasParameter(a => a.Name, p => p.IsInputOutput()) - .HasResultColumn(a => a.Name)) - .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save);; + .UpdateUsingStoredProcedure( + s => s + .HasOriginalValueParameter(a => a.Id) + .HasParameter(a => a.Name, p => p.IsInputOutput()) + .HasResultColumn(a => a.Name)) + .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save); + ; VerifyError( RelationalStrings.StoredProcedureResultColumnParameterConflict(nameof(Animal), nameof(Animal.Name), "Animal_Update"), @@ -2895,10 +2908,11 @@ public virtual void Detects_generated_properties_mapped_to_original_and_current_ { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .UpdateUsingStoredProcedure(s => s - .HasOriginalValueParameter(a => a.Id) - .HasParameter(a => a.Name, p => p.IsOutput()) - .HasOriginalValueParameter(a => a.Name, p => p.IsInputOutput().HasName("OriginalName"))) + .UpdateUsingStoredProcedure( + s => s + .HasOriginalValueParameter(a => a.Id) + .HasParameter(a => a.Name, p => p.IsOutput()) + .HasOriginalValueParameter(a => a.Name, p => p.IsInputOutput().HasName("OriginalName"))) .Property(a => a.Name).ValueGeneratedOnUpdate(); VerifyError( @@ -2911,9 +2925,10 @@ public virtual void Detects_original_value_parameter_on_insert_stored_procedure( { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .InsertUsingStoredProcedure(s => s - .HasParameter(a => a.Id) - .HasOriginalValueParameter(a => a.Name)); + .InsertUsingStoredProcedure( + s => s + .HasParameter(a => a.Id) + .HasOriginalValueParameter(a => a.Name)); VerifyError( RelationalStrings.StoredProcedureOriginalValueParameterOnInsert(nameof(Animal.Name) + "_Original", "Animal_Insert"), @@ -2937,11 +2952,12 @@ public virtual void Detects_unmapped_concurrency_token() { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .UpdateUsingStoredProcedure(s => s - .HasOriginalValueParameter(a => a.Id) - .HasParameter("FavoritePersonId") - .HasParameter(a => a.Name, p => p.IsOutput()) - .HasRowsAffectedReturnValue()) + .UpdateUsingStoredProcedure( + s => s + .HasOriginalValueParameter(a => a.Id) + .HasParameter("FavoritePersonId") + .HasParameter(a => a.Name, p => p.IsOutput()) + .HasRowsAffectedReturnValue()) .Property(a => a.Name).IsRowVersion(); VerifyError( @@ -3071,10 +3087,11 @@ public virtual void Passes_on_derived_entity_type_mapped_to_a_stored_procedure_i { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity().UseTptMappingStrategy(); - modelBuilder.Entity().UpdateUsingStoredProcedure("Update", s => s - .HasOriginalValueParameter(c => c.Id) - .HasParameter(c => c.Breed) - .HasParameter(c => c.Identity)); + modelBuilder.Entity().UpdateUsingStoredProcedure( + "Update", s => s + .HasOriginalValueParameter(c => c.Id) + .HasParameter(c => c.Breed) + .HasParameter(c => c.Identity)); Validate(modelBuilder); } @@ -3085,12 +3102,14 @@ public virtual void Passes_on_derived_entity_type_not_mapped_to_a_stored_procedu var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() .UseTptMappingStrategy() - .UpdateUsingStoredProcedure("Update", s => s - .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) - .HasParameter(a => a.Name) - .HasParameter("FavoritePersonId") - .HasResultColumn(a => a.Name)) - .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save);; + .UpdateUsingStoredProcedure( + "Update", s => s + .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) + .HasParameter(a => a.Name) + .HasParameter("FavoritePersonId") + .HasResultColumn(a => a.Name)) + .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save); + ; modelBuilder.Entity(); Validate(modelBuilder); @@ -3102,12 +3121,14 @@ public virtual void Detects_missing_generated_stored_procedure_parameters_in_TPT var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() .UseTptMappingStrategy() - .UpdateUsingStoredProcedure("Update", s => s - .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) - .HasParameter(a => a.Name) - .HasParameter("FavoritePersonId") - .HasResultColumn(a => a.Name)) - .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save);; + .UpdateUsingStoredProcedure( + "Update", s => s + .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) + .HasParameter(a => a.Name) + .HasParameter("FavoritePersonId") + .HasResultColumn(a => a.Name)) + .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save); + ; modelBuilder.Entity() .UpdateUsingStoredProcedure(s => s.HasParameter(c => c.Breed)); @@ -3123,8 +3144,9 @@ public virtual void Detects_missing_stored_procedure_parameters_for_abstract_pro modelBuilder.Entity().UseTptMappingStrategy(); modelBuilder.Entity>() - .UpdateUsingStoredProcedure("Update", s => s - .HasOriginalValueParameter(a => a.Id)); + .UpdateUsingStoredProcedure( + "Update", s => s + .HasOriginalValueParameter(a => a.Id)); VerifyError( RelationalStrings.StoredProcedurePropertiesNotMapped("Generic", "Update", "{'P0', 'P1', 'P2', 'P3'}"), @@ -3177,15 +3199,17 @@ public virtual void Detects_missing_generated_stored_procedure_parameters() { var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() - .UpdateUsingStoredProcedure("Update", s => s - .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) - .HasParameter(a => a.Name) - .HasParameter("FavoritePersonId") - .HasParameter(a => a.Name)) + .UpdateUsingStoredProcedure( + "Update", s => s + .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) + .HasParameter(a => a.Name) + .HasParameter("FavoritePersonId") + .HasParameter(a => a.Name)) .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save); VerifyError( - RelationalStrings.StoredProcedureGeneratedPropertiesNotMapped(nameof(Animal), + RelationalStrings.StoredProcedureGeneratedPropertiesNotMapped( + nameof(Animal), "Update", "{'Name'}"), modelBuilder); } @@ -3196,17 +3220,19 @@ public virtual void Detects_missing_generated_stored_procedure_parameters_in_TPC var modelBuilder = CreateConventionModelBuilder(); modelBuilder.Entity() .UseTpcMappingStrategy() - .UpdateUsingStoredProcedure("Update", s => s - .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) - .HasParameter(a => a.Name) - .HasParameter("FavoritePersonId") - .HasResultColumn(a => a.Name)) + .UpdateUsingStoredProcedure( + "Update", s => s + .HasOriginalValueParameter(a => a.Id, p => p.HasName("MyId")) + .HasParameter(a => a.Name) + .HasParameter("FavoritePersonId") + .HasResultColumn(a => a.Name)) .Property(a => a.Name).ValueGeneratedOnUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Save); modelBuilder.Entity() - .UpdateUsingStoredProcedure(s => s - .HasResultColumn(a => a.Name) - .HasParameter(c => c.Breed) - .HasParameter(a => a.Name)); + .UpdateUsingStoredProcedure( + s => s + .HasResultColumn(a => a.Name) + .HasParameter(c => c.Breed) + .HasParameter(a => a.Name)); VerifyError( RelationalStrings.StoredProcedurePropertiesNotMapped(nameof(Cat), "Cat_Update", "{'Identity', 'Id', 'FavoritePersonId'}"), @@ -3577,7 +3603,7 @@ private class DerivedTestMethods : TestMethods private class TestMethods : BaseTestMethods { - public static readonly new MethodInfo MethodAMi = typeof(TestMethods).GetTypeInfo().GetDeclaredMethod(nameof(MethodA)); + public static new readonly MethodInfo MethodAMi = typeof(TestMethods).GetTypeInfo().GetDeclaredMethod(nameof(MethodA)); public static readonly MethodInfo MethodBMi = typeof(TestMethods).GetTypeInfo().GetDeclaredMethod(nameof(MethodB)); public static readonly MethodInfo MethodCMi = typeof(TestMethods).GetTypeInfo().GetDeclaredMethod(nameof(MethodC)); public static readonly MethodInfo MethodDMi = typeof(TestMethods).GetTypeInfo().GetDeclaredMethod(nameof(MethodD)); diff --git a/test/EFCore.Relational.Tests/Metadata/RelationalModelTest.cs b/test/EFCore.Relational.Tests/Metadata/RelationalModelTest.cs index cd56d640d28..9d05b1c1abe 100644 --- a/test/EFCore.Relational.Tests/Metadata/RelationalModelTest.cs +++ b/test/EFCore.Relational.Tests/Metadata/RelationalModelTest.cs @@ -33,12 +33,13 @@ public void Can_use_relational_model_with_tables(bool useExplicitMapping, Mappin var model = CreateTestModel(mapToTables: useExplicitMapping, mapping: mapping); Assert.Equal(11, model.Model.GetEntityTypes().Count()); - Assert.Equal(mapping switch - { - Mapping.TPC => 5, - Mapping.TPH => 3, - _ => 6 - }, model.Tables.Count()); + Assert.Equal( + mapping switch + { + Mapping.TPC => 5, + Mapping.TPH => 3, + _ => 6 + }, model.Tables.Count()); Assert.Empty(model.Views); Assert.True(model.Model.GetEntityTypes().All(et => !et.GetViewMappings().Any())); @@ -55,12 +56,13 @@ public void Can_use_relational_model_with_views(Mapping mapping) var model = CreateTestModel(mapToTables: false, mapToViews: true, mapping: mapping); Assert.Equal(11, model.Model.GetEntityTypes().Count()); - Assert.Equal(mapping switch - { - Mapping.TPC => 5, - Mapping.TPH => 3, - _ => 6 - }, model.Views.Count()); + Assert.Equal( + mapping switch + { + Mapping.TPC => 5, + Mapping.TPH => 3, + _ => 6 + }, model.Views.Count()); Assert.Empty(model.Tables); Assert.True(model.Model.GetEntityTypes().All(et => !et.GetTableMappings().Any())); @@ -88,12 +90,13 @@ public void Can_use_relational_model_with_sprocs(bool mapToTables, Mapping mappi _ => 6 }, model.Tables.Count()); - Assert.Equal(mapping switch - { - Mapping.TPC => 24, - Mapping.TPH => 18, - _ => 27 - }, model.StoredProcedures.Count()); + Assert.Equal( + mapping switch + { + Mapping.TPC => 24, + Mapping.TPH => 18, + _ => 27 + }, model.StoredProcedures.Count()); Assert.Empty(model.Views); Assert.True(model.Model.GetEntityTypes().All(et => !et.GetViewMappings().Any())); @@ -121,12 +124,13 @@ public void Can_use_relational_model_with_sprocs_and_views(Mapping mapping) _ => 6 }, model.Views.Count()); - Assert.Equal(mapping switch - { - Mapping.TPC => 24, - Mapping.TPH => 18, - _ => 27 - }, model.StoredProcedures.Count()); + Assert.Equal( + mapping switch + { + Mapping.TPC => 24, + Mapping.TPH => 18, + _ => 27 + }, model.StoredProcedures.Count()); AssertDefaultMappings(model, mapping); AssertViews(model, mapping); @@ -142,19 +146,21 @@ public void Can_use_relational_model_with_tables_and_views(Mapping mapping) var model = CreateTestModel(mapToTables: true, mapToViews: true, mapping: mapping); Assert.Equal(11, model.Model.GetEntityTypes().Count()); - Assert.Equal(mapping switch - { - Mapping.TPC => 5, - Mapping.TPH => 3, - _ => 6 - }, model.Tables.Count()); + Assert.Equal( + mapping switch + { + Mapping.TPC => 5, + Mapping.TPH => 3, + _ => 6 + }, model.Tables.Count()); - Assert.Equal(mapping switch - { - Mapping.TPC => 5, - Mapping.TPH => 3, - _ => 6 - }, model.Views.Count()); + Assert.Equal( + mapping switch + { + Mapping.TPC => 5, + Mapping.TPH => 3, + _ => 6 + }, model.Views.Count()); AssertDefaultMappings(model, mapping); AssertTables(model, mapping); @@ -217,9 +223,9 @@ private static void AssertDefaultMappings(IRelationalModel model, Mapping mappin if (mapping == Mapping.TPC) { Assert.Equal( - RelationalStrings.TableNotMappedEntityType(nameof(SpecialCustomer), customerTable.Name), - Assert.Throws( - () => customerTable.IsOptional(specialCustomerType)).Message); + RelationalStrings.TableNotMappedEntityType(nameof(SpecialCustomer), customerTable.Name), + Assert.Throws( + () => customerTable.IsOptional(specialCustomerType)).Message); } else { @@ -241,7 +247,8 @@ private static void AssertDefaultMappings(IRelationalModel model, Mapping mappin Assert.Null(specialCustomerTable.Schema); Assert.Equal(4, specialCustomerTable.Columns.Count()); - Assert.Null(specialCustomerTable.EntityTypeMappings.Single(m => m.EntityType == specialCustomerType).IsSharedTablePrincipal); + Assert.Null( + specialCustomerTable.EntityTypeMappings.Single(m => m.EntityType == specialCustomerType).IsSharedTablePrincipal); var specialtyColumn = specialCustomerTable.Columns.Single(c => c.Name == nameof(SpecialCustomer.Specialty)); Assert.False(specialtyColumn.IsNullable); @@ -391,30 +398,38 @@ private static void AssertViews(IRelationalModel model, Mapping mapping) : customerType.GetTableName(); var mappedToTable = baseTableName != null; var ordersCustomerForeignKey = orderType.FindNavigation(nameof(Order.Customer)).ForeignKey; - Assert.Equal(mappedToTable && mapping != Mapping.TPC - ? "FK_Order_" + baseTableName + "_CustomerId" - : null, ordersCustomerForeignKey.GetConstraintName()); - Assert.Null(ordersCustomerForeignKey.GetConstraintName( - StoreObjectIdentifier.View(ordersView.Name, ordersView.Schema), - StoreObjectIdentifier.View(customerView.Name, customerView.Schema))); - Assert.Equal(mappedToTable && mapping != Mapping.TPC - ? "FK_Order_" + baseTableName + "_CustomerId" - : null, ordersCustomerForeignKey.GetDefaultName()); - Assert.Null(ordersCustomerForeignKey.GetDefaultName( - StoreObjectIdentifier.View(ordersView.Name, ordersView.Schema), - StoreObjectIdentifier.View(customerView.Name, customerView.Schema))); + Assert.Equal( + mappedToTable && mapping != Mapping.TPC + ? "FK_Order_" + baseTableName + "_CustomerId" + : null, ordersCustomerForeignKey.GetConstraintName()); + Assert.Null( + ordersCustomerForeignKey.GetConstraintName( + StoreObjectIdentifier.View(ordersView.Name, ordersView.Schema), + StoreObjectIdentifier.View(customerView.Name, customerView.Schema))); + Assert.Equal( + mappedToTable && mapping != Mapping.TPC + ? "FK_Order_" + baseTableName + "_CustomerId" + : null, ordersCustomerForeignKey.GetDefaultName()); + Assert.Null( + ordersCustomerForeignKey.GetDefaultName( + StoreObjectIdentifier.View(ordersView.Name, ordersView.Schema), + StoreObjectIdentifier.View(customerView.Name, customerView.Schema))); var ordersCustomerIndex = orderType.FindIndex(ordersCustomerForeignKey.Properties); - Assert.Equal(mappedToTable - ? "IX_Order_CustomerId" - : null, ordersCustomerIndex.GetDatabaseName()); - Assert.Null(ordersCustomerIndex.GetDatabaseName( - StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); - Assert.Equal(mappedToTable - ? "IX_Order_CustomerId" - : null, ordersCustomerIndex.GetDefaultDatabaseName()); - Assert.Null(ordersCustomerIndex.GetDefaultDatabaseName( - StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); + Assert.Equal( + mappedToTable + ? "IX_Order_CustomerId" + : null, ordersCustomerIndex.GetDatabaseName()); + Assert.Null( + ordersCustomerIndex.GetDatabaseName( + StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); + Assert.Equal( + mappedToTable + ? "IX_Order_CustomerId" + : null, ordersCustomerIndex.GetDefaultDatabaseName()); + Assert.Null( + ordersCustomerIndex.GetDefaultDatabaseName( + StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); if (mappedToTable) { @@ -433,16 +448,20 @@ private static void AssertViews(IRelationalModel model, Mapping mapping) Assert.Empty(specialCustomerType.GetCheckConstraints()); } - Assert.Equal(mappedToTable - ? "PK_Order" - : null, orderPk.GetName()); - Assert.Null(orderPk.GetName( - StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); - Assert.Equal(mappedToTable - ? "PK_Order" - : null, orderPk.GetDefaultName()); - Assert.Equal("PK_OrderView", orderPk.GetDefaultName( - StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); + Assert.Equal( + mappedToTable + ? "PK_Order" + : null, orderPk.GetName()); + Assert.Null( + orderPk.GetName( + StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); + Assert.Equal( + mappedToTable + ? "PK_Order" + : null, orderPk.GetDefaultName()); + Assert.Equal( + "PK_OrderView", orderPk.GetDefaultName( + StoreObjectIdentifier.Table(ordersView.Name, ordersView.Schema))); if (mapping == Mapping.TPT) { @@ -698,28 +717,34 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) var ordersCustomerIndex = orderType.FindIndex(orderCustomerFk.Properties); Assert.Equal("IX_Order_CustomerId", ordersCustomerIndex.GetDatabaseName()); - Assert.Equal("IX_Order_CustomerId", ordersCustomerIndex.GetDatabaseName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); + Assert.Equal( + "IX_Order_CustomerId", ordersCustomerIndex.GetDatabaseName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); Assert.Equal("IX_Order_CustomerId", ordersCustomerIndex.GetDefaultDatabaseName()); - Assert.Equal("IX_Order_CustomerId", ordersCustomerIndex.GetDefaultDatabaseName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); + Assert.Equal( + "IX_Order_CustomerId", ordersCustomerIndex.GetDefaultDatabaseName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); Assert.Equal("PK_Order", orderPk.GetName()); - Assert.Equal("PK_Order", orderPk.GetName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); + Assert.Equal( + "PK_Order", orderPk.GetName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); Assert.Equal("PK_Order", orderPk.GetDefaultName()); - Assert.Equal("PK_Order", orderPk.GetDefaultName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); + Assert.Equal( + "PK_Order", orderPk.GetDefaultName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema))); var specialCustomerTable = specialCustomerType.GetTableMappings().Select(t => t.Table).Last(); var specialtyCk = specialCustomerType.GetCheckConstraints().Single(); Assert.Equal("Specialty", specialtyCk.Name); - Assert.Equal("Specialty", specialtyCk.GetName( - StoreObjectIdentifier.Table(specialCustomerTable.Name, specialCustomerTable.Schema))); + Assert.Equal( + "Specialty", specialtyCk.GetName( + StoreObjectIdentifier.Table(specialCustomerTable.Name, specialCustomerTable.Schema))); Assert.Equal("Specialty", specialtyCk.GetDefaultName()); - Assert.Equal("Specialty", specialtyCk.GetDefaultName( - StoreObjectIdentifier.Table(specialCustomerTable.Name, specialCustomerTable.Schema))); + Assert.Equal( + "Specialty", specialtyCk.GetDefaultName( + StoreObjectIdentifier.Table(specialCustomerTable.Name, specialCustomerTable.Schema))); var customerTable = customerType.GetTableMappings().Last().Table; Assert.False(customerTable.IsOptional(customerType)); @@ -765,16 +790,18 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) var specialtyColumn = specialCustomerTable.Columns.Single(c => c.Name == nameof(SpecialCustomer.Specialty)); Assert.False(specialtyColumn.IsNullable); - var addressColumn = specialCustomerTable.Columns.Single(c => - c.Name == nameof(SpecialCustomer.Details) + "_" + nameof(CustomerDetails.Address)); + var addressColumn = specialCustomerTable.Columns.Single( + c => + c.Name == nameof(SpecialCustomer.Details) + "_" + nameof(CustomerDetails.Address)); Assert.False(addressColumn.IsNullable); var specialtyProperty = specialtyColumn.PropertyMappings.First().Property; Assert.Equal( RelationalStrings.PropertyNotMappedToTable( nameof(SpecialCustomer.Specialty), nameof(SpecialCustomer), "Customer"), - Assert.Throws(() => - specialtyProperty.IsColumnNullable(StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))) + Assert.Throws( + () => + specialtyProperty.IsColumnNullable(StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))) .Message); var abstractStringColumn = specialCustomerTable.Columns.Single(c => c.Name == nameof(AbstractCustomer.AbstractString)); @@ -784,10 +811,7 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) var abstractStringProperty = abstractStringColumn.PropertyMappings.First().Property; Assert.Equal(2, abstractStringProperty.GetTableColumnMappings().Count()); Assert.Equal( - new[] - { - StoreObjectIdentifier.Table(specialCustomerTable.Name, specialCustomerTable.Schema) - }, + new[] { StoreObjectIdentifier.Table(specialCustomerTable.Name, specialCustomerTable.Schema) }, abstractStringProperty.GetMappedStoreObjects(StoreObjectType.Table)); var extraSpecialCustomerTable = @@ -832,13 +856,15 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) Assert.Empty(ordersTable.ReferencingForeignKeyConstraints); Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetConstraintName()); - Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetConstraintName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); + Assert.Equal( + orderCustomerFkConstraint.Name, orderCustomerFk.GetConstraintName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), + StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetDefaultName()); - Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetDefaultName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); + Assert.Equal( + orderCustomerFkConstraint.Name, orderCustomerFk.GetDefaultName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), + StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); var specialCustomerUniqueConstraint = baseTable.UniqueConstraints.Single(c => !c.GetIsPrimaryKey()); Assert.Equal("AK_AbstractBase_SpecialtyAk", specialCustomerUniqueConstraint.Name); @@ -865,7 +891,8 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) Assert.Same(specialCustomerTable, anotherSpecialCustomerFkConstraint.PrincipalTable); Assert.Equal(ReferentialAction.Cascade, specialCustomerTptFkConstraint.OnDeleteAction); - Assert.Equal(new[] { orderCustomerFkConstraint, specialCustomerTptFkConstraint }, customerTable.ReferencingForeignKeyConstraints); + Assert.Equal( + new[] { orderCustomerFkConstraint, specialCustomerTptFkConstraint }, customerTable.ReferencingForeignKeyConstraints); var specialCustomerDbIndex = specialCustomerTable.Indexes.Last(); Assert.Equal("IX_SpecialCustomer_RelatedCustomerSpecialty", specialCustomerDbIndex.Name); @@ -912,8 +939,9 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) Assert.Equal(12, specialCustomerTable.Columns.Count()); - var addressColumn = specialCustomerTable.Columns.Single(c => - c.Name == nameof(SpecialCustomer.Details) + "_" + nameof(CustomerDetails.Address)); + var addressColumn = specialCustomerTable.Columns.Single( + c => + c.Name == nameof(SpecialCustomer.Details) + "_" + nameof(CustomerDetails.Address)); Assert.True(specialtyColumn.IsNullable); Assert.True(addressColumn.IsNullable); @@ -925,18 +953,12 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) var abstractStringProperty = abstractStringColumn.PropertyMappings.First().Property; Assert.Equal(3, abstractStringProperty.GetTableColumnMappings().Count()); Assert.Equal( - new[] - { - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema) - }, + new[] { StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema) }, abstractStringProperty.GetMappedStoreObjects(StoreObjectType.Table)); Assert.Equal(5, idProperty.GetTableColumnMappings().Count()); Assert.Equal( - new[] - { - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema) - }, + new[] { StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema) }, idProperty.GetMappedStoreObjects(StoreObjectType.Table)); var orderCustomerFkConstraint = orderCustomerFk.GetMappedConstraints().Single(); @@ -952,13 +974,15 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) Assert.Empty(ordersTable.ReferencingForeignKeyConstraints); Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetConstraintName()); - Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetConstraintName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); + Assert.Equal( + orderCustomerFkConstraint.Name, orderCustomerFk.GetConstraintName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), + StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetDefaultName()); - Assert.Equal(orderCustomerFkConstraint.Name, orderCustomerFk.GetDefaultName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); + Assert.Equal( + orderCustomerFkConstraint.Name, orderCustomerFk.GetDefaultName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), + StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); Assert.Equal("PK_" + baseTable.Name, specialCustomerPkConstraint.Name); Assert.Equal("AK_AbstractBase_SpecialtyAk", specialCustomerUniqueConstraint.Name); @@ -971,7 +995,8 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) Assert.Equal("FK_AbstractBase_AbstractBase_AnotherRelatedCustomerId", anotherSpecialCustomerFkConstraint.Name); Assert.NotNull(anotherSpecialCustomerFkConstraint.MappedForeignKeys.Single()); - Assert.Equal(new[] { anotherSpecialCustomerFkConstraint, specialCustomerFkConstraint, orderCustomerFkConstraint }, + Assert.Equal( + new[] { anotherSpecialCustomerFkConstraint, specialCustomerFkConstraint, orderCustomerFkConstraint }, customerTable.ReferencingForeignKeyConstraints); Assert.Equal("IX_AbstractBase_RelatedCustomerSpecialty", specialCustomerDbIndex.Name); @@ -1003,8 +1028,9 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) Assert.Equal(2, extraSpecialCustomerTable.EntityTypeMappings.Count()); - var addressColumn = extraSpecialCustomerTable.Columns.Single(c => - c.Name == nameof(SpecialCustomer.Details) + "_" + nameof(CustomerDetails.Address)); + var addressColumn = extraSpecialCustomerTable.Columns.Single( + c => + c.Name == nameof(SpecialCustomer.Details) + "_" + nameof(CustomerDetails.Address)); Assert.False(addressColumn.IsNullable); var abstractStringProperty = abstractStringColumn.PropertyMappings.Single().Property; @@ -1031,13 +1057,15 @@ private static void AssertTables(IRelationalModel model, Mapping mapping) Assert.Empty(orderCustomerFk.GetMappedConstraints()); Assert.Null(orderCustomerFk.GetConstraintName()); - Assert.Null(orderCustomerFk.GetConstraintName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); + Assert.Null( + orderCustomerFk.GetConstraintName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), + StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); Assert.Null(orderCustomerFk.GetDefaultName()); - Assert.Null(orderCustomerFk.GetDefaultName( - StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), - StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); + Assert.Null( + orderCustomerFk.GetDefaultName( + StoreObjectIdentifier.Table(ordersTable.Name, ordersTable.Schema), + StoreObjectIdentifier.Table(customerTable.Name, customerTable.Schema))); Assert.Equal("PK_SpecialCustomer", specialCustomerPkConstraint.Name); Assert.Equal("AK_SpecialCustomer_SpecialtyAk", specialCustomerUniqueConstraint.Name); @@ -1291,7 +1319,14 @@ private static void AssertSprocs(IRelationalModel model, Mapping mapping, bool m specialCustomerType.GetInsertStoredProcedureMappings().Single(m => m.IncludesDerivedTypes).StoreStoredProcedure.Name); Assert.Null(baseInsertSproc.Schema); Assert.Equal( - new[] { nameof(AbstractBase), nameof(AbstractCustomer), nameof(Customer), nameof(ExtraSpecialCustomer), nameof(SpecialCustomer) }, + new[] + { + nameof(AbstractBase), + nameof(AbstractCustomer), + nameof(Customer), + nameof(ExtraSpecialCustomer), + nameof(SpecialCustomer) + }, baseInsertSproc.EntityTypeMappings.Select(m => m.EntityType.DisplayName())); Assert.Equal( @@ -1323,7 +1358,14 @@ private static void AssertSprocs(IRelationalModel model, Mapping mapping, bool m Assert.Null(baseUpdateSproc.Schema); Assert.Equal( - new[] { nameof(AbstractBase), nameof(AbstractCustomer), nameof(Customer), nameof(ExtraSpecialCustomer), nameof(SpecialCustomer) }, + new[] + { + nameof(AbstractBase), + nameof(AbstractCustomer), + nameof(Customer), + nameof(ExtraSpecialCustomer), + nameof(SpecialCustomer) + }, baseUpdateSproc.EntityTypeMappings.Select(m => m.EntityType.DisplayName())); Assert.Equal( @@ -1355,7 +1397,14 @@ private static void AssertSprocs(IRelationalModel model, Mapping mapping, bool m Assert.Null(baseDeleteSproc.Schema); Assert.Equal( - new[] { nameof(AbstractBase), nameof(AbstractCustomer), nameof(Customer), nameof(ExtraSpecialCustomer), nameof(SpecialCustomer) }, + new[] + { + nameof(AbstractBase), + nameof(AbstractCustomer), + nameof(Customer), + nameof(ExtraSpecialCustomer), + nameof(SpecialCustomer) + }, baseDeleteSproc.EntityTypeMappings.Select(m => m.EntityType.DisplayName())); Assert.Equal( @@ -1969,8 +2018,8 @@ private IRelationalModel CreateTestModel( cb.UseTpcMappingStrategy(); } else if (mapping == Mapping.TPT - && !mapToTables - && !mapToViews) + && !mapToTables + && !mapToViews) { cb.UseTptMappingStrategy(); } @@ -2137,16 +2186,19 @@ private IRelationalModel CreateTestModel( { cb.OwnsOne( c => c.Details, cdb => cdb - .InsertUsingStoredProcedure("CustomerDetailsInsert", s => s - .HasParameter("SpecialCustomerId") - .HasParameter(b => b.BirthDay) - .HasParameter(b => b.Address)) - .UpdateUsingStoredProcedure("CustomerDetailsUpdate", s => s - .HasOriginalValueParameter("SpecialCustomerId") - .HasParameter(b => b.BirthDay) - .HasParameter(b => b.Address)) - .DeleteUsingStoredProcedure("CustomerDetailsDelete", s => s - .HasOriginalValueParameter("SpecialCustomerId"))); + .InsertUsingStoredProcedure( + "CustomerDetailsInsert", s => s + .HasParameter("SpecialCustomerId") + .HasParameter(b => b.BirthDay) + .HasParameter(b => b.Address)) + .UpdateUsingStoredProcedure( + "CustomerDetailsUpdate", s => s + .HasOriginalValueParameter("SpecialCustomerId") + .HasParameter(b => b.BirthDay) + .HasParameter(b => b.Address)) + .DeleteUsingStoredProcedure( + "CustomerDetailsDelete", s => s + .HasOriginalValueParameter("SpecialCustomerId"))); } } }); @@ -2338,6 +2390,7 @@ private IRelationalModel CreateTestModel( odb.OwnsOne(od => od.BillingAddress); odb.OwnsOne(od => od.ShippingAddress); } + odb.Navigation(od => od.BillingAddress).IsRequired(); odb.Navigation(od => od.ShippingAddress).IsRequired(); }); @@ -2395,53 +2448,61 @@ public void Can_use_relational_model_with_entity_splitting_and_table_splitting_o if (mapToViews) { - cb.ToView("CustomerView", tb => - { - tb.Property(c => c.AbstractString); - }); + cb.ToView( + "CustomerView", tb => + { + tb.Property(c => c.AbstractString); + }); - cb.SplitToView("CustomerDetailsView", tb => - { - tb.Property(c => c.AbstractString); - tb.Property(c => c.Specialty); - tb.Property(c => c.RelatedCustomerSpecialty); - }); + cb.SplitToView( + "CustomerDetailsView", tb => + { + tb.Property(c => c.AbstractString); + tb.Property(c => c.Specialty); + tb.Property(c => c.RelatedCustomerSpecialty); + }); } else { - cb.ToTable("Customer", tb => - { - tb.Property(c => c.AbstractString); - }); + cb.ToTable( + "Customer", tb => + { + tb.Property(c => c.AbstractString); + }); - cb.SplitToTable("CustomerDetails", tb => - { - tb.Property(c => c.AbstractString); - tb.Property(c => c.Specialty); - tb.Property(c => c.RelatedCustomerSpecialty); - }); + cb.SplitToTable( + "CustomerDetails", tb => + { + tb.Property(c => c.AbstractString); + tb.Property(c => c.Specialty); + tb.Property(c => c.RelatedCustomerSpecialty); + }); } - cb.OwnsOne(c => c.Details, db => - { - if (mapToViews) + cb.OwnsOne( + c => c.Details, db => { - db.ToView("CustomerView"); - - db.SplitToView("CustomerDetailsView", tb => + if (mapToViews) { - tb.Property(d => d.BirthDay); - }); - } - else - { - db.SplitToTable("CustomerDetails", tb => + db.ToView("CustomerView"); + + db.SplitToView( + "CustomerDetailsView", tb => + { + tb.Property(d => d.BirthDay); + }); + } + else { - tb.Property(d => d.BirthDay); - }); - } - db.Property("SpecialCustomerId").HasColumnName("Id"); - }); + db.SplitToTable( + "CustomerDetails", tb => + { + tb.Property(d => d.BirthDay); + }); + } + + db.Property("SpecialCustomerId").HasColumnName("Id"); + }); cb.Navigation(c => c.Details).IsRequired(); }); @@ -2470,7 +2531,8 @@ public void Can_use_relational_model_with_entity_splitting_and_table_splitting_o var customerDetailsView = model.Views.Single(t => t.Name == "CustomerDetailsView"); - Assert.Equal(new[] { customerView, customerDetailsView }, + Assert.Equal( + new[] { customerView, customerDetailsView }, customerType.GetViewMappings().Select(m => m.View)); Assert.Equal(2, customerDetailsView.EntityTypeMappings.Count()); @@ -2482,13 +2544,16 @@ public void Can_use_relational_model_with_entity_splitting_and_table_splitting_o Assert.False(detailsSplitMapping.IsSharedTablePrincipal); Assert.False(detailsSplitMapping.IsSplitEntityTypePrincipal); - Assert.Equal(new[] { customerView, customerDetailsView }, + Assert.Equal( + new[] { customerView, customerDetailsView }, detailsType.GetViewMappings().Select(m => m.View)); - Assert.Equal(new[] { "AbstractString", "Details_Address", "EnumValue", "Id", "Name", "SomeShort" }, + Assert.Equal( + new[] { "AbstractString", "Details_Address", "EnumValue", "Id", "Name", "SomeShort" }, customerView.Columns.Select(t => t.Name)); - Assert.Equal(new[] { "AbstractString", "Details_BirthDay", "Id", "RelatedCustomerSpecialty", "Specialty" }, + Assert.Equal( + new[] { "AbstractString", "Details_BirthDay", "Id", "RelatedCustomerSpecialty", "Specialty" }, customerDetailsView.Columns.Select(t => t.Name)); } else @@ -2509,7 +2574,8 @@ public void Can_use_relational_model_with_entity_splitting_and_table_splitting_o var customerDetailsTable = model.Tables.Single(t => t.Name == "CustomerDetails"); - Assert.Equal(new[] { customerTable, customerDetailsTable }, + Assert.Equal( + new[] { customerTable, customerDetailsTable }, customerType.GetTableMappings().Select(m => m.Table)); Assert.Equal(2, customerDetailsTable.EntityTypeMappings.Count()); @@ -2521,7 +2587,8 @@ public void Can_use_relational_model_with_entity_splitting_and_table_splitting_o Assert.False(detailsSplitMapping.IsSharedTablePrincipal); Assert.False(detailsSplitMapping.IsSplitEntityTypePrincipal); - Assert.Equal(new[] { customerTable, customerDetailsTable }, + Assert.Equal( + new[] { customerTable, customerDetailsTable }, detailsType.GetTableMappings().Select(m => m.Table)); Assert.Single(customerTable.UniqueConstraints); @@ -2529,7 +2596,8 @@ public void Can_use_relational_model_with_entity_splitting_and_table_splitting_o Assert.Empty(customerTable.Indexes); Assert.Empty(customerTable.GetRowInternalForeignKeys(customerType)); Assert.Single(customerTable.GetRowInternalForeignKeys(detailsType)); - Assert.Equal(new[] { "Id", "AbstractString", "Details_Address", "EnumValue", "Name", "SomeShort" }, + Assert.Equal( + new[] { "Id", "AbstractString", "Details_Address", "EnumValue", "Name", "SomeShort" }, customerTable.Columns.Select(t => t.Name)); Assert.Single(customerDetailsTable.UniqueConstraints); @@ -2537,11 +2605,13 @@ public void Can_use_relational_model_with_entity_splitting_and_table_splitting_o Assert.Empty(customerDetailsTable.Indexes); Assert.Empty(customerDetailsTable.GetRowInternalForeignKeys(customerType)); Assert.Single(customerDetailsTable.GetRowInternalForeignKeys(detailsType)); - Assert.Equal(new[] { "Id", "AbstractString", "Details_BirthDay", "RelatedCustomerSpecialty", "Specialty" }, + Assert.Equal( + new[] { "Id", "AbstractString", "Details_BirthDay", "RelatedCustomerSpecialty", "Specialty" }, customerDetailsTable.Columns.Select(t => t.Name)); Assert.Equal(2, fkConstraint.MappedForeignKeys.Count()); - Assert.All(fkConstraint.MappedForeignKeys, + Assert.All( + fkConstraint.MappedForeignKeys, fk => { Assert.True(fk.IsUnique); @@ -3050,10 +3120,11 @@ private static IRelationalModel Finalize(TestHelpers.TestModelBuilder modelBuild protected virtual TestHelpers.TestModelBuilder CreateConventionModelBuilder() => FakeRelationalTestHelpers.Instance.CreateConventionBuilder( configureContext: b => - b.ConfigureWarnings(w => - w.Default(WarningBehavior.Throw) - .Ignore(RelationalEventId.ForeignKeyTpcPrincipalWarning) - .Ignore(RelationalEventId.AllIndexPropertiesNotToMappedToAnyTable))); + b.ConfigureWarnings( + w => + w.Default(WarningBehavior.Throw) + .Ignore(RelationalEventId.ForeignKeyTpcPrincipalWarning) + .Ignore(RelationalEventId.AllIndexPropertiesNotToMappedToAnyTable))); public enum Mapping { diff --git a/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTest.cs b/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTest.cs index d7325bdf543..deede76ec67 100644 --- a/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTest.cs +++ b/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTest.cs @@ -1394,10 +1394,11 @@ public void Can_add_tables_with_entity_splitting_with_seed_data() MouseId = "1", BoneId = "2" }); - x.SplitToTable("AnimalDetails", t => - { - t.Property("BoneId"); - }); + x.SplitToTable( + "AnimalDetails", t => + { + t.Property("BoneId"); + }); }); }, upOps => Assert.Collection( @@ -1807,10 +1808,12 @@ public void Add_column_with_seed_data() [ConditionalFact] public void Throws_on_null_keys_in_seed_data() - => Assert.Equal(RelationalStrings.NullKeyValue( - "dbo.Firefly", - "Id"), - Assert.Throws(() => Execute( + => Assert.Equal( + RelationalStrings.NullKeyValue( + "dbo.Firefly", + "Id"), + Assert.Throws( + () => Execute( common => common.Entity( "Firefly", x => @@ -1824,13 +1827,15 @@ public void Throws_on_null_keys_in_seed_data() _ => { }, upOps => { }, downOps => { })).Message); - + [ConditionalFact] public void Throws_on_composite_null_keys_in_seed_data() - => Assert.Equal(RelationalStrings.NullKeyValue( - "dbo.Firefly", - "Id"), - Assert.Throws(() => Execute( + => Assert.Equal( + RelationalStrings.NullKeyValue( + "dbo.Firefly", + "Id"), + Assert.Throws( + () => Execute( common => common.Entity( "Firefly", x => @@ -1851,7 +1856,8 @@ public void Throws_on_composite_null_keys_in_seed_data() [InlineData(true)] [InlineData(false)] public void Throws_on_duplicate_seed_data(bool enableSensitiveLogging) - => Assert.Equal(enableSensitiveLogging + => Assert.Equal( + enableSensitiveLogging ? RelationalStrings.DuplicateSeedDataSensitive( "Firefly (Dictionary)", "{42}", @@ -1859,7 +1865,8 @@ public void Throws_on_duplicate_seed_data(bool enableSensitiveLogging) : RelationalStrings.DuplicateSeedData( "Firefly (Dictionary)", "dbo.Firefly"), - Assert.Throws(() => Execute( + Assert.Throws( + () => Execute( common => common.Entity( "Firefly", x => @@ -1876,12 +1883,13 @@ public void Throws_on_duplicate_seed_data(bool enableSensitiveLogging) downOps => { }, _ => { }, enableSensitiveLogging: enableSensitiveLogging)).Message); - + [ConditionalTheory] [InlineData(true)] [InlineData(false)] public void Throws_on_conflicting_seed_data(bool enableSensitiveLogging) - => Assert.Equal(enableSensitiveLogging + => Assert.Equal( + enableSensitiveLogging ? RelationalStrings.ConflictingSeedValuesSensitive( "FireflyDetails (Dictionary)", "{42}", @@ -1893,20 +1901,21 @@ public void Throws_on_conflicting_seed_data(bool enableSensitiveLogging) "FireflyDetails (Dictionary)", "Firefly", "Name"), - Assert.Throws(() => Execute( + Assert.Throws( + () => Execute( common => { common.Entity( - "Firefly", - x => - { - x.ToTable("Firefly"); - x.Property("Id"); - x.Property("Name"); - x.HasData( - new { Id = 42, Name = "1" }); - }); - + "Firefly", + x => + { + x.ToTable("Firefly"); + x.Property("Id"); + x.Property("Name"); + x.HasData( + new { Id = 42, Name = "1" }); + }); + common.Entity( "FireflyDetails", x => @@ -3308,7 +3317,8 @@ public void Rename_check_constraint() "Pelican", x => { - x.ToTable("Pelican", "dbo", tb => tb.HasCheckConstraint("CK_Pelican_AlternateId", "AlternateId > Id").HasName("CK_Flamingo")); + x.ToTable( + "Pelican", "dbo", tb => tb.HasCheckConstraint("CK_Pelican_AlternateId", "AlternateId > Id").HasName("CK_Flamingo")); x.Property("Id"); x.Property("AlternateId"); }), @@ -8221,7 +8231,7 @@ public void Change_TPT_to_TPC_with_FKs_and_seed_data() Assert.Equal(new[] { "Id" }, operation.PrincipalColumns); Assert.Equal(ReferentialAction.Cascade, operation.OnDelete); })); - + [ConditionalFact] public void Add_foreign_key_on_base_type() => Execute( @@ -9711,7 +9721,6 @@ public virtual SomeOwnedEntity OwnedEntity protected class SomeOwnedEntity { } - [ConditionalFact] public void SeedData_and_PK_rename() @@ -10364,7 +10373,7 @@ public void SeedData_change_with_default() m.Values, v => Assert.Equal((int)SomeEnum.NonDefault, v)); })); - + [ConditionalFact] public void SeedData_no_change_enum_key() => Execute( diff --git a/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTestBase.cs b/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTestBase.cs index 44f1d2af7e9..6f591dbfd03 100644 --- a/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTestBase.cs +++ b/test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTestBase.cs @@ -118,7 +118,7 @@ protected virtual TestHelpers.TestModelBuilder CreateModelBuilder(bool skipConve => TestHelpers.CreateConventionBuilder(configureConventions: skipConventions ? c => c.RemoveAllConventions() : null); protected virtual MigrationsModelDiffer CreateModelDiffer(DbContextOptions options) - => new MigrationsModelDiffer( + => new( new TestRelationalTypeMappingSource( TestServiceFactory.Instance.Create(), TestServiceFactory.Instance.Create()), diff --git a/test/EFCore.Relational.Tests/ModelBuilding/RelationalModelBuilderTest.cs b/test/EFCore.Relational.Tests/ModelBuilding/RelationalModelBuilderTest.cs index b095a4887a4..db4bfbd645b 100644 --- a/test/EFCore.Relational.Tests/ModelBuilding/RelationalModelBuilderTest.cs +++ b/test/EFCore.Relational.Tests/ModelBuilding/RelationalModelBuilderTest.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Data; - #nullable enable +using System.Data; + // ReSharper disable InconsistentNaming namespace Microsoft.EntityFrameworkCore.ModelBuilding; -public partial class RelationalModelBuilderTest : ModelBuilderTest +public class RelationalModelBuilderTest : ModelBuilderTest { public abstract class RelationalNonRelationshipTestBase : NonRelationshipTestBase { @@ -46,7 +46,8 @@ public virtual void Can_use_table_splitting() Assert.False(entity.IsTableExcludedFromMigrations()); Assert.False(entity.IsTableExcludedFromMigrations(StoreObjectIdentifier.Table("Order", "dbo"))); Assert.True(entity.IsTableExcludedFromMigrations(StoreObjectIdentifier.Table("OrderDetails", "dbo"))); - Assert.Same(entity.GetMappingFragments().Single(), entity.FindMappingFragment(StoreObjectIdentifier.Table("OrderDetails", "dbo"))); + Assert.Same( + entity.GetMappingFragments().Single(), entity.FindMappingFragment(StoreObjectIdentifier.Table("OrderDetails", "dbo"))); var customerId = entity.FindProperty(nameof(Order.CustomerId))!; Assert.Equal("CustomerId", customerId.GetColumnName()); @@ -452,7 +453,9 @@ public virtual void Sproc_overrides_update_when_renamed_in_TPH() Assert.Equal("Update", updateSproc.Name); Assert.Equal("dbo", updateSproc.Schema); Assert.Equal(new[] { "Id", "BookId", null, "RowVersion", "RowVersion" }, updateSproc.Parameters.Select(p => p.PropertyName)); - Assert.Equal(new[] { "UpdateId", "BookId", "RowsAffected", "OriginalRowVersion", "RowVersion" }, updateSproc.Parameters.Select(p => p.Name)); + Assert.Equal( + new[] { "UpdateId", "BookId", "RowsAffected", "OriginalRowVersion", "RowVersion" }, + updateSproc.Parameters.Select(p => p.Name)); Assert.Empty(updateSproc.ResultColumns); Assert.Equal("bar2", updateSproc["foo"]); Assert.Same(bookLabel, updateSproc.EntityType); @@ -722,12 +725,13 @@ public virtual void Can_use_sproc_mapping_with_owned_reference() s => s .HasAnnotation("foo", "bar2") .HasOriginalValueParameter(b => b.Id) - .HasOriginalValueParameter(b => b.BookId, p => - { - var parameterBuilder = p.HasName("UpdateId"); - var nonGenericBuilder = (IInfrastructure)parameterBuilder; - Assert.IsAssignableFrom(nonGenericBuilder.Instance.GetInfrastructure()); - }) + .HasOriginalValueParameter( + b => b.BookId, p => + { + var parameterBuilder = p.HasName("UpdateId"); + var nonGenericBuilder = (IInfrastructure)parameterBuilder; + Assert.IsAssignableFrom(nonGenericBuilder.Instance.GetInfrastructure()); + }) .HasResultColumn( b => b.Id, p => { @@ -788,13 +792,16 @@ public virtual void Can_use_sproc_mapping_with_owned_reference() Assert.Empty(bookId.GetOverrides()); Assert.Equal( "BookId", - bookId.GetColumnName(StoreObjectIdentifier.Create(bookOwnership1.DeclaringEntityType, StoreObjectType.InsertStoredProcedure)!.Value)); + bookId.GetColumnName( + StoreObjectIdentifier.Create(bookOwnership1.DeclaringEntityType, StoreObjectType.InsertStoredProcedure)!.Value)); Assert.Equal( "BookId", - bookId.GetColumnName(StoreObjectIdentifier.Create(bookOwnership1.DeclaringEntityType, StoreObjectType.UpdateStoredProcedure)!.Value)); + bookId.GetColumnName( + StoreObjectIdentifier.Create(bookOwnership1.DeclaringEntityType, StoreObjectType.UpdateStoredProcedure)!.Value)); Assert.Equal( "BookId", - bookId.GetColumnName(StoreObjectIdentifier.Create(bookOwnership1.DeclaringEntityType, StoreObjectType.DeleteStoredProcedure)!.Value)); + bookId.GetColumnName( + StoreObjectIdentifier.Create(bookOwnership1.DeclaringEntityType, StoreObjectType.DeleteStoredProcedure)!.Value)); Assert.Null(bookOwnership2.DeclaringEntityType.GetInsertStoredProcedure()); Assert.Null(bookOwnership2.DeclaringEntityType.GetUpdateStoredProcedure()); @@ -1804,7 +1811,7 @@ public override TestStoredProcedureBuilder HasParameter( public override TestStoredProcedureBuilder HasParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasParameter( Expression> propertyExpression) @@ -1813,7 +1820,9 @@ public override TestStoredProcedureBuilder HasParameter( public override TestStoredProcedureBuilder HasParameter( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasParameter(propertyExpression, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasParameter( + propertyExpression, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasParameter( Expression> propertyExpression) @@ -1822,7 +1831,7 @@ public override TestStoredProcedureBuilder HasParameter HasParameter( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasParameter(propertyExpression, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasParameter(propertyExpression, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasOriginalValueParameter( string propertyName) @@ -1831,7 +1840,9 @@ public override TestStoredProcedureBuilder HasOriginalValueParameter( public override TestStoredProcedureBuilder HasOriginalValueParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyName, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasOriginalValueParameter( + propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasOriginalValueParameter( Expression> propertyExpression) @@ -1840,7 +1851,9 @@ public override TestStoredProcedureBuilder HasOriginalValueParameter HasOriginalValueParameter( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyExpression, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasOriginalValueParameter( + propertyExpression, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasOriginalValueParameter( Expression> propertyExpression) @@ -1849,14 +1862,16 @@ public override TestStoredProcedureBuilder HasOriginalValueParameter HasOriginalValueParameter( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyExpression, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasOriginalValueParameter( + propertyExpression, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasRowsAffectedParameter() => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter()); public override TestStoredProcedureBuilder HasRowsAffectedParameter( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasResultColumn( string propertyName) @@ -1865,7 +1880,7 @@ public override TestStoredProcedureBuilder HasResultColumn( public override TestStoredProcedureBuilder HasResultColumn( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasResultColumn( Expression> propertyExpression) @@ -1874,7 +1889,9 @@ public override TestStoredProcedureBuilder HasResultColumn( public override TestStoredProcedureBuilder HasResultColumn( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasResultColumn(propertyExpression, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasResultColumn( + propertyExpression, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasResultColumn( Expression> propertyExpression) @@ -1883,14 +1900,16 @@ public override TestStoredProcedureBuilder HasResultColumn HasResultColumn( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasResultColumn(propertyExpression, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasResultColumn( + propertyExpression, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasRowsAffectedResultColumn() => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn()); public override TestStoredProcedureBuilder HasRowsAffectedResultColumn( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasRowsAffectedReturnValue(bool rowsAffectedReturned) => Wrap(StoredProcedureBuilder.HasRowsAffectedReturnValue(rowsAffectedReturned)); @@ -1923,7 +1942,7 @@ public override TestStoredProcedureBuilder HasParameter( public override TestStoredProcedureBuilder HasParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasParameter( Expression> propertyExpression) @@ -1934,7 +1953,7 @@ public override TestStoredProcedureBuilder HasParameter( Action buildAction) => Wrap( StoredProcedureBuilder.HasParameter( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasParameter( Expression> propertyExpression) @@ -1945,7 +1964,7 @@ public override TestStoredProcedureBuilder HasParameter buildAction) => Wrap( StoredProcedureBuilder.HasParameter( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasOriginalValueParameter( string propertyName) @@ -1954,7 +1973,9 @@ public override TestStoredProcedureBuilder HasOriginalValueParameter( public override TestStoredProcedureBuilder HasOriginalValueParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyName, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasOriginalValueParameter( + propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasOriginalValueParameter( Expression> propertyExpression) @@ -1965,7 +1986,7 @@ public override TestStoredProcedureBuilder HasOriginalValueParameter buildAction) => Wrap( StoredProcedureBuilder.HasOriginalValueParameter( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasOriginalValueParameter( Expression> propertyExpression) @@ -1976,14 +1997,14 @@ public override TestStoredProcedureBuilder HasOriginalValueParameter buildAction) => Wrap( StoredProcedureBuilder.HasOriginalValueParameter( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasRowsAffectedParameter() => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter()); public override TestStoredProcedureBuilder HasRowsAffectedParameter( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestStoredProcedureBuilder HasResultColumn( string propertyName) @@ -1992,7 +2013,7 @@ public override TestStoredProcedureBuilder HasResultColumn( public override TestStoredProcedureBuilder HasResultColumn( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasResultColumn( Expression> propertyExpression) @@ -2003,7 +2024,7 @@ public override TestStoredProcedureBuilder HasResultColumn( Action buildAction) => Wrap( StoredProcedureBuilder.HasResultColumn( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasResultColumn( Expression> propertyExpression) @@ -2014,14 +2035,14 @@ public override TestStoredProcedureBuilder HasResultColumn buildAction) => Wrap( StoredProcedureBuilder.HasResultColumn( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasRowsAffectedResultColumn() => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn()); public override TestStoredProcedureBuilder HasRowsAffectedResultColumn( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestStoredProcedureBuilder HasRowsAffectedReturnValue(bool rowsAffectedReturned) => Wrap(StoredProcedureBuilder.HasRowsAffectedReturnValue(rowsAffectedReturned)); @@ -2089,7 +2110,6 @@ public abstract TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedReturnValue(bool rowsAffectedReturned = true); - public abstract TestOwnedNavigationStoredProcedureBuilder HasAnnotation( string annotation, object? value); @@ -2124,16 +2144,16 @@ public override TestOwnedNavigationStoredProcedureBuilder HasParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasParameter( Expression> propertyExpression) - => Wrap(StoredProcedureBuilder.HasParameter(propertyExpression)); + => Wrap(StoredProcedureBuilder.HasParameter(propertyExpression)); public override TestOwnedNavigationStoredProcedureBuilder HasParameter( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasParameter(propertyExpression, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasParameter(propertyExpression, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasOriginalValueParameter( string propertyName) @@ -2142,23 +2162,27 @@ public override TestOwnedNavigationStoredProcedureBuilder HasOriginalValueParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyName, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasOriginalValueParameter( + propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasOriginalValueParameter( Expression> propertyExpression) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyExpression)); + => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyExpression)); public override TestOwnedNavigationStoredProcedureBuilder HasOriginalValueParameter( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyExpression, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasOriginalValueParameter( + propertyExpression, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedParameter() => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter()); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedParameter( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasResultColumn( string propertyName) @@ -2167,7 +2191,7 @@ public override TestOwnedNavigationStoredProcedureBuilder HasResultColumn( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasResultColumn( Expression> propertyExpression) @@ -2176,16 +2200,19 @@ public override TestOwnedNavigationStoredProcedureBuilder HasResultColumn( Expression> propertyExpression, Action buildAction) - => Wrap(StoredProcedureBuilder.HasResultColumn(propertyExpression, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasResultColumn( + propertyExpression, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedResultColumn() => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn()); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedResultColumn( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); - public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedReturnValue(bool rowsAffectedReturned) + public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedReturnValue( + bool rowsAffectedReturned) => Wrap(StoredProcedureBuilder.HasRowsAffectedReturnValue(rowsAffectedReturned)); public override TestOwnedNavigationStoredProcedureBuilder HasAnnotation( @@ -2221,7 +2248,7 @@ public override TestOwnedNavigationStoredProcedureBuilder HasParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasParameter(propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasParameter( Expression> propertyExpression) @@ -2232,7 +2259,7 @@ public override TestOwnedNavigationStoredProcedureBuilder buildAction) => Wrap( StoredProcedureBuilder.HasParameter( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasOriginalValueParameter( string propertyName) @@ -2241,7 +2268,9 @@ public override TestOwnedNavigationStoredProcedureBuilder HasOriginalValueParameter( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasOriginalValueParameter(propertyName, s => buildAction(new(s)))); + => Wrap( + StoredProcedureBuilder.HasOriginalValueParameter( + propertyName, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasOriginalValueParameter( Expression> propertyExpression) @@ -2252,14 +2281,14 @@ public override TestOwnedNavigationStoredProcedureBuilder buildAction) => Wrap( StoredProcedureBuilder.HasOriginalValueParameter( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedParameter() => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter()); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedParameter( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedParameter(s => buildAction(new TestStoredProcedureParameterBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasResultColumn( string propertyName) @@ -2268,7 +2297,7 @@ public override TestOwnedNavigationStoredProcedureBuilder HasResultColumn( string propertyName, Action buildAction) - => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasResultColumn(propertyName, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasResultColumn( Expression> propertyExpression) @@ -2279,16 +2308,17 @@ public override TestOwnedNavigationStoredProcedureBuilder buildAction) => Wrap( StoredProcedureBuilder.HasResultColumn( - propertyExpression.GetMemberAccess().Name, s => buildAction(new(s)))); + propertyExpression.GetMemberAccess().Name, s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedResultColumn() => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn()); public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedResultColumn( Action buildAction) - => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new(s)))); + => Wrap(StoredProcedureBuilder.HasRowsAffectedResultColumn(s => buildAction(new TestStoredProcedureResultColumnBuilder(s)))); - public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedReturnValue(bool rowsAffectedReturned) + public override TestOwnedNavigationStoredProcedureBuilder HasRowsAffectedReturnValue( + bool rowsAffectedReturned) => Wrap(StoredProcedureBuilder.HasRowsAffectedReturnValue(rowsAffectedReturned)); public override TestOwnedNavigationStoredProcedureBuilder HasAnnotation( @@ -2340,7 +2370,7 @@ StoredProcedureResultColumnBuilder IInfrastructure StoredProcedureResultColumnBuilder; protected virtual TestStoredProcedureResultColumnBuilder Wrap(StoredProcedureResultColumnBuilder storedProcedureResultColumnBuilder) - => new TestStoredProcedureResultColumnBuilder(storedProcedureResultColumnBuilder); + => new(storedProcedureResultColumnBuilder); public virtual TestStoredProcedureResultColumnBuilder HasName(string name) => Wrap(StoredProcedureResultColumnBuilder.HasName(name)); @@ -2354,7 +2384,8 @@ public virtual TestStoredProcedureResultColumnBuilder HasAnnotation( public abstract class TestTableValuedFunctionBuilder : DbFunctionBuilderBase where TEntity : class { - protected TestTableValuedFunctionBuilder(IMutableDbFunction function) : base(function) + protected TestTableValuedFunctionBuilder(IMutableDbFunction function) + : base(function) { } @@ -2411,7 +2442,7 @@ CheckConstraintBuilder IInfrastructure.Instance => CheckConstraintBuilder; protected virtual TestCheckConstraintBuilder Wrap(CheckConstraintBuilder checkConstraintBuilder) - => new TestCheckConstraintBuilder(checkConstraintBuilder); + => new(checkConstraintBuilder); public virtual TestCheckConstraintBuilder HasName(string name) => Wrap(CheckConstraintBuilder.HasName(name)); diff --git a/test/EFCore.Relational.Tests/ModelBuilding/RelationalTestModelBuilderExtensions.cs b/test/EFCore.Relational.Tests/ModelBuilding/RelationalTestModelBuilderExtensions.cs index 47e89f7fc76..19a84b92361 100644 --- a/test/EFCore.Relational.Tests/ModelBuilding/RelationalTestModelBuilderExtensions.cs +++ b/test/EFCore.Relational.Tests/ModelBuilding/RelationalTestModelBuilderExtensions.cs @@ -128,8 +128,8 @@ public static ModelBuilderTest.TestPropertyBuilder IsFixedLength HasJsonPropertyName( - this ModelBuilderTest.TestPropertyBuilder builder, - string? name) + this ModelBuilderTest.TestPropertyBuilder builder, + string? name) { switch (builder) { @@ -798,9 +798,7 @@ public static ModelBuilderTest.TestEntityTypeBuilder ToFunction> buildAction) where TEntity : class - { - return builder; - } + => builder; public static ModelBuilderTest.TestEntityTypeBuilder UpdateUsingStoredProcedure( this ModelBuilderTest.TestEntityTypeBuilder builder, @@ -1295,7 +1293,8 @@ public static ModelBuilderTest.TestOwnedNavigationBuilder HasJsonPropertyName( + public static ModelBuilderTest.TestOwnedNavigationBuilder HasJsonPropertyName( this ModelBuilderTest.TestOwnedNavigationBuilder builder, string? name) where TOwnerEntity : class diff --git a/test/EFCore.Relational.Tests/RelationalApiConsistencyTest.cs b/test/EFCore.Relational.Tests/RelationalApiConsistencyTest.cs index 6932510c1da..93bd17b494a 100644 --- a/test/EFCore.Relational.Tests/RelationalApiConsistencyTest.cs +++ b/test/EFCore.Relational.Tests/RelationalApiConsistencyTest.cs @@ -49,64 +49,55 @@ public class RelationalApiConsistencyFixture : ApiConsistencyFixtureBase => new() { { - typeof(IReadOnlyDbFunction), - (typeof(IMutableDbFunction), + typeof(IReadOnlyDbFunction), (typeof(IMutableDbFunction), typeof(IConventionDbFunction), typeof(IConventionDbFunctionBuilder), typeof(IDbFunction)) }, { - typeof(IReadOnlyDbFunctionParameter), - (typeof(IMutableDbFunctionParameter), + typeof(IReadOnlyDbFunctionParameter), (typeof(IMutableDbFunctionParameter), typeof(IConventionDbFunctionParameter), typeof(IConventionDbFunctionParameterBuilder), typeof(IDbFunctionParameter)) }, { - typeof(IReadOnlyStoredProcedure), - (typeof(IMutableStoredProcedure), + typeof(IReadOnlyStoredProcedure), (typeof(IMutableStoredProcedure), typeof(IConventionStoredProcedure), typeof(IConventionStoredProcedureBuilder), typeof(IStoredProcedure)) }, { - typeof(IReadOnlyStoredProcedureParameter), - (typeof(IMutableStoredProcedureParameter), + typeof(IReadOnlyStoredProcedureParameter), (typeof(IMutableStoredProcedureParameter), typeof(IConventionStoredProcedureParameter), typeof(IConventionStoredProcedureParameterBuilder), typeof(IStoredProcedureParameter)) }, { - typeof(IReadOnlyStoredProcedureResultColumn), - (typeof(IMutableStoredProcedureResultColumn), + typeof(IReadOnlyStoredProcedureResultColumn), (typeof(IMutableStoredProcedureResultColumn), typeof(IConventionStoredProcedureResultColumn), typeof(IConventionStoredProcedureResultColumnBuilder), typeof(IStoredProcedureResultColumn)) }, { - typeof(IReadOnlySequence), - (typeof(IMutableSequence), + typeof(IReadOnlySequence), (typeof(IMutableSequence), typeof(IConventionSequence), typeof(IConventionSequenceBuilder), typeof(ISequence)) }, { - typeof(IReadOnlyCheckConstraint), - (typeof(IMutableCheckConstraint), + typeof(IReadOnlyCheckConstraint), (typeof(IMutableCheckConstraint), typeof(IConventionCheckConstraint), typeof(IConventionCheckConstraintBuilder), typeof(ICheckConstraint)) }, { - typeof(IReadOnlyEntityTypeMappingFragment), - (typeof(IMutableEntityTypeMappingFragment), + typeof(IReadOnlyEntityTypeMappingFragment), (typeof(IMutableEntityTypeMappingFragment), typeof(IConventionEntityTypeMappingFragment), null, typeof(IEntityTypeMappingFragment)) }, { - typeof(IReadOnlyRelationalPropertyOverrides), - (typeof(IMutableRelationalPropertyOverrides), + typeof(IReadOnlyRelationalPropertyOverrides), (typeof(IMutableRelationalPropertyOverrides), typeof(IConventionRelationalPropertyOverrides), null, typeof(IRelationalPropertyOverrides)) @@ -277,12 +268,12 @@ public override new[] { typeof(IReadOnlyProperty) }), GetMethod( typeof(StoredProcedureBuilder<>), - nameof(StoredProcedureBuilder.HasParameter), + nameof(StoredProcedureBuilder.HasParameter), genericParameterCount: 2, - (typeTypes, methodTypes) => new[] - { - typeof(Expression<>).MakeGenericType(typeof(Func<,>).MakeGenericType(methodTypes[0], methodTypes[1])) - }), + (typeTypes, methodTypes) => new[] + { + typeof(Expression<>).MakeGenericType(typeof(Func<,>).MakeGenericType(methodTypes[0], methodTypes[1])) + }), GetMethod( typeof(StoredProcedureBuilder<>), nameof(StoredProcedureBuilder.HasParameter), @@ -356,7 +347,7 @@ public override typeof(RelationalConnectionDiagnosticsLogger).GetMethod( nameof(IRelationalConnectionDiagnosticsLogger.ConnectionClosedAsync)), typeof(RelationalConnectionDiagnosticsLogger).GetMethod( - nameof(IRelationalConnectionDiagnosticsLogger.ConnectionDisposingAsync)), + nameof(IRelationalConnectionDiagnosticsLogger.ConnectionDisposingAsync)), typeof(RelationalConnectionDiagnosticsLogger).GetMethod( nameof(IRelationalConnectionDiagnosticsLogger.ConnectionDisposedAsync)) }; @@ -393,7 +384,8 @@ protected override void Initialize() GenericFluentApiTypes.Add(typeof(SplitViewBuilder), typeof(SplitViewBuilder<>)); GenericFluentApiTypes.Add(typeof(OwnedNavigationSplitViewBuilder), typeof(OwnedNavigationSplitViewBuilder<,>)); GenericFluentApiTypes.Add(typeof(TableValuedFunctionBuilder), typeof(TableValuedFunctionBuilder<>)); - GenericFluentApiTypes.Add(typeof(OwnedNavigationTableValuedFunctionBuilder), typeof(OwnedNavigationTableValuedFunctionBuilder<,>)); + GenericFluentApiTypes.Add( + typeof(OwnedNavigationTableValuedFunctionBuilder), typeof(OwnedNavigationTableValuedFunctionBuilder<,>)); GenericFluentApiTypes.Add(typeof(StoredProcedureBuilder), typeof(StoredProcedureBuilder<>)); GenericFluentApiTypes.Add(typeof(OwnedNavigationStoredProcedureBuilder), typeof(OwnedNavigationStoredProcedureBuilder<,>)); GenericFluentApiTypes.Add(typeof(ColumnBuilder), typeof(ColumnBuilder<>)); diff --git a/test/EFCore.Relational.Tests/Storage/RawSqlCommandBuilderTest.cs b/test/EFCore.Relational.Tests/Storage/RawSqlCommandBuilderTest.cs index d745be04f3b..85dad0c815c 100644 --- a/test/EFCore.Relational.Tests/Storage/RawSqlCommandBuilderTest.cs +++ b/test/EFCore.Relational.Tests/Storage/RawSqlCommandBuilderTest.cs @@ -30,9 +30,9 @@ private static RawSqlCommandBuilder CreateBuilder() new RelationalSqlGenerationHelperDependencies()), new ParameterNameGeneratorFactory( new ParameterNameGeneratorDependencies()), - new TestRelationalTypeMappingSource( - TestServiceFactory.Instance.Create(), - TestServiceFactory.Instance.Create())); + new TestRelationalTypeMappingSource( + TestServiceFactory.Instance.Create(), + TestServiceFactory.Instance.Create())); [ConditionalFact] public virtual void Builds_RelationalCommand_with_empty_parameter_list() diff --git a/test/EFCore.Relational.Tests/Storage/RelationalCommandTest.cs b/test/EFCore.Relational.Tests/Storage/RelationalCommandTest.cs index 51d5828c2c4..02ae6901265 100644 --- a/test/EFCore.Relational.Tests/Storage/RelationalCommandTest.cs +++ b/test/EFCore.Relational.Tests/Storage/RelationalCommandTest.cs @@ -365,7 +365,7 @@ DbDataReader CreateDbDataReader() ConnectionString, new FakeCommandExecutor( executeReader: (c, b) => CreateDbDataReader(), - executeReaderAsync: (c, b, ct) => Task.FromResult(CreateDbDataReader()))); + executeReaderAsync: (c, b, ct) => Task.FromResult(CreateDbDataReader()))); var optionsExtension = new FakeRelationalOptionsExtension().WithConnection(fakeDbConnection); var options = CreateOptions(optionsExtension); diff --git a/test/EFCore.Relational.Tests/Storage/RelationalDataReaderTest.cs b/test/EFCore.Relational.Tests/Storage/RelationalDataReaderTest.cs index 327778d11ee..6e83a112a82 100644 --- a/test/EFCore.Relational.Tests/Storage/RelationalDataReaderTest.cs +++ b/test/EFCore.Relational.Tests/Storage/RelationalDataReaderTest.cs @@ -17,12 +17,13 @@ public async Task Does_not_hold_reference_to_DbDataReader_after_dispose(bool asy var fakeConnection = CreateConnection(); var relationalCommand = CreateRelationalCommand(commandText: "CommandText"); - var reader = relationalCommand.ExecuteReader(new( - fakeConnection, - new Dictionary(), - readerColumns: null, - context: null, - logger: null)); + var reader = relationalCommand.ExecuteReader( + new RelationalCommandParameterObject( + fakeConnection, + new Dictionary(), + readerColumns: null, + context: null, + logger: null)); Assert.NotNull(reader.DbDataReader); diff --git a/test/EFCore.Relational.Tests/Storage/RelationalTypeMapperTest.cs b/test/EFCore.Relational.Tests/Storage/RelationalTypeMapperTest.cs index f53b7a9a83f..103c622292c 100644 --- a/test/EFCore.Relational.Tests/Storage/RelationalTypeMapperTest.cs +++ b/test/EFCore.Relational.Tests/Storage/RelationalTypeMapperTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Storage; public class RelationalTypeMapperTest : RelationalTypeMapperTestBase diff --git a/test/EFCore.Relational.Tests/Storage/RelationalTypeMappingTest.cs b/test/EFCore.Relational.Tests/Storage/RelationalTypeMappingTest.cs index 7e1ed58a30f..9244c1e1f01 100644 --- a/test/EFCore.Relational.Tests/Storage/RelationalTypeMappingTest.cs +++ b/test/EFCore.Relational.Tests/Storage/RelationalTypeMappingTest.cs @@ -31,15 +31,15 @@ public FakeValueComparer() public static ValueConverter CreateConverter(Type modelType) => (ValueConverter)Activator.CreateInstance( - typeof(FakeValueConverter<,>).MakeGenericType(modelType, typeof(object))); + typeof(FakeValueConverter<,>).MakeGenericType(modelType, typeof(object))); public static ValueConverter CreateConverter(Type modelType, Type providerType) => (ValueConverter)Activator.CreateInstance( - typeof(FakeValueConverter<,>).MakeGenericType(modelType, providerType)); + typeof(FakeValueConverter<,>).MakeGenericType(modelType, providerType)); public static ValueComparer CreateComparer(Type type) => (ValueComparer)Activator.CreateInstance( - typeof(FakeValueComparer<>).MakeGenericType(type)); + typeof(FakeValueComparer<>).MakeGenericType(type)); [ConditionalTheory] [InlineData(typeof(BoolTypeMapping), typeof(bool))] diff --git a/test/EFCore.Relational.Tests/TestUtilities/TestModificationCommandBatch.cs b/test/EFCore.Relational.Tests/TestUtilities/TestModificationCommandBatch.cs index cbc5157338f..0dca9e838c6 100644 --- a/test/EFCore.Relational.Tests/TestUtilities/TestModificationCommandBatch.cs +++ b/test/EFCore.Relational.Tests/TestUtilities/TestModificationCommandBatch.cs @@ -9,7 +9,9 @@ public TestModificationCommandBatch( ModificationCommandBatchFactoryDependencies dependencies, int? maxBatchSize) : base(dependencies) - => MaxBatchSize = maxBatchSize ?? 42; + { + MaxBatchSize = maxBatchSize ?? 42; + } protected override int MaxBatchSize { get; } } diff --git a/test/EFCore.Relational.Tests/Update/ModificationCommandComparerTest.cs b/test/EFCore.Relational.Tests/Update/ModificationCommandComparerTest.cs index cdc176bb4a3..868f3fbacde 100644 --- a/test/EFCore.Relational.Tests/Update/ModificationCommandComparerTest.cs +++ b/test/EFCore.Relational.Tests/Update/ModificationCommandComparerTest.cs @@ -34,7 +34,6 @@ public void Compare_returns_0_only_for_commands_that_are_equal() entry1.SetEntityState(EntityState.Added); var modificationCommandAdded = modificationCommandSource.CreateModificationCommand( new ModificationCommandParameters(table, false, false, null, new ParameterNameGenerator().GenerateNext)); - // new ModificationCommandParameters("A", null, false, false, null, new ParameterNameGenerator().GenerateNext)); modificationCommandAdded.AddEntry(entry1, true); var entry2 = stateManager.GetOrCreateEntry(new object()); diff --git a/test/EFCore.Relational.Tests/Update/ReaderModificationCommandBatchTest.cs b/test/EFCore.Relational.Tests/Update/ReaderModificationCommandBatchTest.cs index f8e1460d2d9..6375c8f448c 100644 --- a/test/EFCore.Relational.Tests/Update/ReaderModificationCommandBatchTest.cs +++ b/test/EFCore.Relational.Tests/Update/ReaderModificationCommandBatchTest.cs @@ -59,11 +59,13 @@ public void TryAddCommand_adds_command_if_batch_is_valid() Assert.True(batch.TryAddCommand(command2)); batch.Complete(moreBatchesExpected: false); - Assert.Collection(batch.ModificationCommands, + Assert.Collection( + batch.ModificationCommands, m => Assert.Same(command1, m), m => Assert.Same(command2, m)); - Assert.Equal(@"UPDATE ""T1"" SET ""Col2"" = @p0 + Assert.Equal( + @"UPDATE ""T1"" SET ""Col2"" = @p0 RETURNING 1; UPDATE ""T2"" SET ""Col2"" = @p1 RETURNING 1; @@ -120,7 +122,8 @@ public void TryAddCommand_does_not_add_command_batch_is_invalid() Assert.Same(command1, Assert.Single(batch.ModificationCommands)); - Assert.Equal(@"UPDATE ""T1"" SET ""Col2"" = @p0 + Assert.Equal( + @"UPDATE ""T1"" SET ""Col2"" = @p0 RETURNING 1; ", batch.CommandText, @@ -690,11 +693,7 @@ private static InternalEntityEntry CreateEntry( var model = BuildModel(generateKeyValues, computeNonKeyValue); return FakeRelationalTestHelpers.Instance.CreateInternalEntry( - model, entityState, new T1 - { - Id = overrideKeyValues ? 1 : default, - Name = computeNonKeyValue ? null : "Test" - }); + model, entityState, new T1 { Id = overrideKeyValues ? 1 : default, Name = computeNonKeyValue ? null : "Test" }); } private static FakeDbDataReader CreateFakeDataReader(string[] columnNames = null, IList results = null) @@ -743,7 +742,6 @@ private static ModificationCommandBatchFactoryDependencies CreateDependencies( new FakeDiagnosticsLogger()); } - public string CommandText => SqlBuilder.ToString(); diff --git a/test/EFCore.Relational.Tests/Update/UpdateSqlGeneratorTest.cs b/test/EFCore.Relational.Tests/Update/UpdateSqlGeneratorTest.cs index 37d1b2a81eb..db218cd147c 100644 --- a/test/EFCore.Relational.Tests/Update/UpdateSqlGeneratorTest.cs +++ b/test/EFCore.Relational.Tests/Update/UpdateSqlGeneratorTest.cs @@ -24,7 +24,8 @@ protected override void AppendDeleteOperation_creates_full_delete_command_text_v ", stringBuilder.ToString()); - protected override void AppendDeleteOperation_creates_full_delete_command_text_with_concurrency_check_verification(StringBuilder stringBuilder) + protected override void AppendDeleteOperation_creates_full_delete_command_text_with_concurrency_check_verification( + StringBuilder stringBuilder) => AssertBaseline( @"DELETE FROM ""dbo"".""Ducks"" WHERE ""Id"" = @p0 AND ""ConcurrencyToken"" IS NULL diff --git a/test/EFCore.Specification.Tests/ApiConsistencyTestBase.cs b/test/EFCore.Specification.Tests/ApiConsistencyTestBase.cs index e411c146825..b01a4733054 100644 --- a/test/EFCore.Specification.Tests/ApiConsistencyTestBase.cs +++ b/test/EFCore.Specification.Tests/ApiConsistencyTestBase.cs @@ -70,7 +70,8 @@ public void Generic_fluent_api_methods_should_return_generic_types() if (method.ReturnType == type.BaseType && !Fixture.UnmatchedMetadataMethods.Contains(method)) { - var parameters = method.GetParameters().Select(p => GetEquivalentGenericType(p.ParameterType, type.GetGenericArguments())).ToArray(); + var parameters = method.GetParameters() + .Select(p => GetEquivalentGenericType(p.ParameterType, type.GetGenericArguments())).ToArray(); var hidingMethod = type.GetMethod( method.Name, method.GetGenericArguments().Length, @@ -106,10 +107,13 @@ public void Generic_fluent_api_methods_should_return_generic_types() || hidingMethod.GetGenericArguments().Length != genericType.GetGenericArguments().Length || hidingMethod.ReturnType.GetGenericTypeDefinition() != genericType || !hidingMethod.GetParameters().Skip(1).Select(p => p.ParameterType) - .SequenceEqual(method.GetParameters().Skip(1).Select(p => GetEquivalentGenericType(p.ParameterType, hidingMethod.GetGenericArguments())))) + .SequenceEqual( + method.GetParameters().Skip(1).Select( + p => GetEquivalentGenericType(p.ParameterType, hidingMethod.GetGenericArguments())))) { continue; } + methodFound = true; break; } @@ -143,7 +147,6 @@ protected Type GetEquivalentGenericType(Type parameterType, Type[] genericArgume return parameterType; } - [ConditionalFact] public void Builders_have_matching_methods() { @@ -162,16 +165,19 @@ public void Builders_have_matching_methods() if (targetMethod.Name == method.Name && targetMethod.GetGenericArguments().Length == method.GetGenericArguments().Length && method.GetParameters().Select(p => p.ParameterType) - .SequenceEqual(targetMethod.GetParameters().Select(p => p.ParameterType), + .SequenceEqual( + targetMethod.GetParameters().Select(p => p.ParameterType), new ParameterTypeEqualityComparer(method, targetMethod, this))) { - Check.DebugAssert(hidingMethod == null, - "There should only be one method with the expected signature. Found: " + Environment.NewLine - + Format(hidingMethod ?? targetMethod, tuple.Value) + Environment.NewLine + Check.DebugAssert( + hidingMethod == null, + "There should only be one method with the expected signature. Found: " + + Environment.NewLine + + Format(hidingMethod ?? targetMethod, tuple.Value) + + Environment.NewLine + Format(targetMethod, tuple.Value)); hidingMethod = targetMethod; - continue; } } @@ -180,7 +186,7 @@ public void Builders_have_matching_methods() unmatchedMethods.Add((tuple.Key, method)); } else if (method.ReturnType == tuple.Key - && hidingMethod.ReturnType != tuple.Value) + && hidingMethod.ReturnType != tuple.Value) { wrongReturnMethods.Add((tuple.Value, method)); } @@ -1005,7 +1011,8 @@ public bool Equals(Type sourceParameterType, Type targetParameterType) var sourceType = _sourceMethod.DeclaringType; var targetType = _targetMethod.DeclaringType; if (_targetMethod.DeclaringType.IsGenericType - && sourceParameterType == _tests.GetEquivalentGenericType( + && sourceParameterType + == _tests.GetEquivalentGenericType( sourceParameterType, _targetMethod.DeclaringType.GetGenericArguments())) { return true; @@ -1204,7 +1211,10 @@ public virtual IReadOnlyList Runtime)> MetadataMethods { get; } = new(); - protected static MethodInfo GetMethod(Type type, string name, int genericParameterCount, + protected static MethodInfo GetMethod( + Type type, + string name, + int genericParameterCount, Func parameterGenerator) => type.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly) .Single( diff --git a/test/EFCore.Specification.Tests/BuiltInDataTypesTestBase.cs b/test/EFCore.Specification.Tests/BuiltInDataTypesTestBase.cs index af483575e6d..d356d51fc47 100644 --- a/test/EFCore.Specification.Tests/BuiltInDataTypesTestBase.cs +++ b/test/EFCore.Specification.Tests/BuiltInDataTypesTestBase.cs @@ -1722,7 +1722,8 @@ public virtual void Can_insert_and_read_back_all_nullable_data_types_with_values AssertEqualIfMapped(entityType, -1.23456789, () => dt.TestNullableDouble); AssertEqualIfMapped(entityType, -1234567890.01M, () => dt.TestNullableDecimal); AssertEqualIfMapped(entityType, DateTime.Parse("01/01/2000 12:34:56").ToUniversalTime(), () => dt.TestNullableDateTime); - AssertEqualIfMapped(entityType, new DateTimeOffset(DateTime.Parse("01/01/2000 12:34:56"), TimeSpan.FromHours(-8.0)), + AssertEqualIfMapped( + entityType, new DateTimeOffset(DateTime.Parse("01/01/2000 12:34:56"), TimeSpan.FromHours(-8.0)), () => dt.TestNullableDateTimeOffset); AssertEqualIfMapped(entityType, new TimeSpan(0, 10, 9, 8, 7), () => dt.TestNullableTimeSpan); AssertEqualIfMapped(entityType, -1.234F, () => dt.TestNullableSingle); diff --git a/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs b/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs index c322ffd67f5..9c352ec1c36 100644 --- a/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs +++ b/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs @@ -817,9 +817,7 @@ protected override string StoreName => "CustomConverters"; protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) - { - configurationBuilder.DefaultTypeMapping().HasConversion(); - } + => configurationBuilder.DefaultTypeMapping().HasConversion(); protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { diff --git a/test/EFCore.Specification.Tests/EntityFrameworkServiceCollectionExtensionsTestBase.cs b/test/EFCore.Specification.Tests/EntityFrameworkServiceCollectionExtensionsTestBase.cs index d241fe6fca3..6f90e6ac196 100644 --- a/test/EFCore.Specification.Tests/EntityFrameworkServiceCollectionExtensionsTestBase.cs +++ b/test/EFCore.Specification.Tests/EntityFrameworkServiceCollectionExtensionsTestBase.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public abstract class EntityFrameworkServiceCollectionExtensionsTestBase diff --git a/test/EFCore.Specification.Tests/F1FixtureBase.cs b/test/EFCore.Specification.Tests/F1FixtureBase.cs index 565a4ef0171..58893a1c2e3 100644 --- a/test/EFCore.Specification.Tests/F1FixtureBase.cs +++ b/test/EFCore.Specification.Tests/F1FixtureBase.cs @@ -170,7 +170,6 @@ protected virtual void BuildModelExternal(ModelBuilder modelBuilder) ConfigureConstructorBinding(b.Metadata); }); - modelBuilder.Entity().Property("Version").IsRowVersion(); modelBuilder.Entity().Property("Version").IsRowVersion(); @@ -213,7 +212,8 @@ private static void ConfigureConstructorBinding(IMutableEntityType muta => ConfigureConstructorBinding(mutableEntityType, propertyNames); private static void ConfigureConstructorBinding( - IMutableEntityType mutableEntityType, params string[] propertyNames) + IMutableEntityType mutableEntityType, + params string[] propertyNames) { var entityType = (EntityType)mutableEntityType; var loaderField = typeof(TLoaderEntity).GetField("_loader", BindingFlags.Instance | BindingFlags.NonPublic); diff --git a/test/EFCore.Specification.Tests/FindTestBase.cs b/test/EFCore.Specification.Tests/FindTestBase.cs index 68f0e18b332..e883f682884 100644 --- a/test/EFCore.Specification.Tests/FindTestBase.cs +++ b/test/EFCore.Specification.Tests/FindTestBase.cs @@ -846,25 +846,25 @@ public override ValueTask FindAsync( } public class FindViaContextFinder : TestFinder - { - public override TEntity Find(DbContext context, params object[] keyValues) - => (TEntity)context.Find(typeof(TEntity), keyValues); - - public override async ValueTask FindAsync( - CancellationType cancellationType, - DbContext context, - object[] keyValues, - CancellationToken cancellationToken = default) - => cancellationType switch - { - CancellationType.Right => (TEntity)await context.FindAsync( - typeof(TEntity), keyValues, cancellationToken: cancellationToken), - CancellationType.Wrong => (TEntity)await context.FindAsync( - typeof(TEntity), keyValues?.Concat(new object[] { cancellationToken }).ToArray()), - CancellationType.None => (TEntity)await context.FindAsync(typeof(TEntity), keyValues), - _ => throw new ArgumentOutOfRangeException(nameof(cancellationType), cancellationType, null) - }; - } + { + public override TEntity Find(DbContext context, params object[] keyValues) + => (TEntity)context.Find(typeof(TEntity), keyValues); + + public override async ValueTask FindAsync( + CancellationType cancellationType, + DbContext context, + object[] keyValues, + CancellationToken cancellationToken = default) + => cancellationType switch + { + CancellationType.Right => (TEntity)await context.FindAsync( + typeof(TEntity), keyValues, cancellationToken: cancellationToken), + CancellationType.Wrong => (TEntity)await context.FindAsync( + typeof(TEntity), keyValues?.Concat(new object[] { cancellationToken }).ToArray()), + CancellationType.None => (TEntity)await context.FindAsync(typeof(TEntity), keyValues), + _ => throw new ArgumentOutOfRangeException(nameof(cancellationType), cancellationType, null) + }; + } public class FindViaNonGenericContextFinder : TestFinder { @@ -884,7 +884,6 @@ public override ValueTask FindAsync( CancellationType.None => context.FindAsync(keyValues), _ => throw new ArgumentOutOfRangeException(nameof(cancellationType), cancellationType, null) }; - } } } diff --git a/test/EFCore.Specification.Tests/InterceptionTestBase.cs b/test/EFCore.Specification.Tests/InterceptionTestBase.cs index 0617d7c6bde..9760f80eb47 100644 --- a/test/EFCore.Specification.Tests/InterceptionTestBase.cs +++ b/test/EFCore.Specification.Tests/InterceptionTestBase.cs @@ -65,14 +65,14 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public UniverseContext CreateContext(IInterceptor appInterceptor, params IInterceptor[] injectedInterceptors) => Seed( - new( + new UniverseContext( Fixture.CreateOptions( new[] { appInterceptor }, injectedInterceptors))); public UniverseContext CreateContext( IEnumerable appInterceptors, IEnumerable injectedInterceptors = null) - => Seed(new(Fixture.CreateOptions(appInterceptors, injectedInterceptors ?? Enumerable.Empty()))); + => Seed(new UniverseContext(Fixture.CreateOptions(appInterceptors, injectedInterceptors ?? Enumerable.Empty()))); public virtual UniverseContext Seed(UniverseContext context) => context; diff --git a/test/EFCore.Specification.Tests/MaterializationInterceptionTestBase.cs b/test/EFCore.Specification.Tests/MaterializationInterceptionTestBase.cs index 758da09e0ef..21fc249b0fc 100644 --- a/test/EFCore.Specification.Tests/MaterializationInterceptionTestBase.cs +++ b/test/EFCore.Specification.Tests/MaterializationInterceptionTestBase.cs @@ -3,8 +3,6 @@ #nullable enable -using ISingletonInterceptor = Microsoft.EntityFrameworkCore.Diagnostics.ISingletonInterceptor; - namespace Microsoft.EntityFrameworkCore; public abstract class MaterializationInterceptionTestBase : SingletonInterceptorsTestBase @@ -344,7 +342,8 @@ public ValidatingMaterializationInterceptor( } public InterceptionResult CreatingInstance( - MaterializationInterceptionData materializationData, InterceptionResult result) + MaterializationInterceptionData materializationData, + InterceptionResult result) { _validate(materializationData, null, nameof(CreatingInstance)); @@ -352,7 +351,8 @@ public InterceptionResult CreatingInstance( } public object CreatedInstance( - MaterializationInterceptionData materializationData, object entity) + MaterializationInterceptionData materializationData, + object entity) { _validate(materializationData, entity, nameof(CreatedInstance)); @@ -360,7 +360,9 @@ public object CreatedInstance( } public InterceptionResult InitializingInstance( - MaterializationInterceptionData materializationData, object entity, InterceptionResult result) + MaterializationInterceptionData materializationData, + object entity, + InterceptionResult result) { _validate(materializationData, entity, nameof(InitializingInstance)); @@ -368,7 +370,8 @@ public InterceptionResult InitializingInstance( } public object InitializedInstance( - MaterializationInterceptionData materializationData, object entity) + MaterializationInterceptionData materializationData, + object entity) { _validate(materializationData, entity, nameof(InitializedInstance)); @@ -386,25 +389,30 @@ public CountingMaterializationInterceptor(string id) } public InterceptionResult CreatingInstance( - MaterializationInterceptionData materializationData, InterceptionResult result) + MaterializationInterceptionData materializationData, + InterceptionResult result) => result; public object CreatedInstance( - MaterializationInterceptionData materializationData, object entity) + MaterializationInterceptionData materializationData, + object entity) { ((Book)entity).CreatedBy += _id; return entity; } public InterceptionResult InitializingInstance( - MaterializationInterceptionData materializationData, object entity, InterceptionResult result) + MaterializationInterceptionData materializationData, + object entity, + InterceptionResult result) { ((Book)entity).InitializingBy += _id; return result; } public object InitializedInstance( - MaterializationInterceptionData materializationData, object entity) + MaterializationInterceptionData materializationData, + object entity) { ((Book)entity).InitializedBy += _id; return entity; diff --git a/test/EFCore.Specification.Tests/PropertyValuesTestBase.cs b/test/EFCore.Specification.Tests/PropertyValuesTestBase.cs index 6a7b67f389b..078d9371725 100644 --- a/test/EFCore.Specification.Tests/PropertyValuesTestBase.cs +++ b/test/EFCore.Specification.Tests/PropertyValuesTestBase.cs @@ -2255,22 +2255,23 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con b.Property("Shadow2"); }); - modelBuilder.Entity(b => - { - b.Property("Shadow3"); - - b.HasMany(p => p.VirtualTeams) - .WithMany(p => p.Employees) - .UsingEntity>( - "VirtualTeamEmployee", - j => j - .HasOne() - .WithMany(), - j => j - .HasOne() - .WithMany(), - j => j.IndexerProperty("Payload")); - }); + modelBuilder.Entity( + b => + { + b.Property("Shadow3"); + + b.HasMany(p => p.VirtualTeams) + .WithMany(p => p.Employees) + .UsingEntity>( + "VirtualTeamEmployee", + j => j + .HasOne() + .WithMany(), + j => j + .HasOne() + .WithMany(), + j => j.IndexerProperty("Payload")); + }); modelBuilder.Entity(b => b.Property("Shadow4")); @@ -2353,7 +2354,7 @@ protected override void Seed(PoolableDbContext context) LastName = "Miller", LeaveBalance = 45, Office = offices[0], - VirtualTeams = new List{ teams[0], teams[1] } + VirtualTeams = new List { teams[0], teams[1] } }, new CurrentEmployee { @@ -2362,7 +2363,7 @@ protected override void Seed(PoolableDbContext context) LastName = "Vickers", LeaveBalance = 62, Office = offices[1], - VirtualTeams = new List{ teams[1], teams[2] } + VirtualTeams = new List { teams[1], teams[2] } }, new PastEmployee { @@ -2433,7 +2434,8 @@ protected override void Seed(PoolableDbContext context) public class PropertyValuesMaterializationInterceptor : IMaterializationInterceptor { public InterceptionResult CreatingInstance( - MaterializationInterceptionData materializationData, InterceptionResult result) + MaterializationInterceptionData materializationData, + InterceptionResult result) => result; public object CreatedInstance(MaterializationInterceptionData materializationData, object entity) diff --git a/test/EFCore.Specification.Tests/Query/ComplexNavigationsCollectionsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/ComplexNavigationsCollectionsQueryTestBase.cs index b6e38da3a54..bf8812b5a60 100644 --- a/test/EFCore.Specification.Tests/Query/ComplexNavigationsCollectionsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/ComplexNavigationsCollectionsQueryTestBase.cs @@ -417,8 +417,8 @@ orderby l1.Id let inner = (from l2 in ss.Set() where l2.Name != "Foo" let innerL1s = (from innerL1 in ss.Set() - where innerL1.OneToMany_Optional1.Any(innerL2 => innerL2.Id == l2.Id) - select innerL1.Name).AsEnumerable() + where innerL1.OneToMany_Optional1.Any(innerL2 => innerL2.Id == l2.Id) + select innerL1.Name).AsEnumerable() select innerL1s.ToList()).FirstOrDefault() select inner.ToList(), assertOrder: true, @@ -1352,7 +1352,10 @@ public virtual Task Include_collection_multiple_with_filter_EF_Property(bool asy .Include(l1 => EF.Property>(l1, "OneToMany_Optional1")) .ThenInclude(l2 => EF.Property(l2, "OneToOne_Optional_PK2")) .ThenInclude(l3 => EF.Property(l3, "OneToOne_Optional_FK3")) - .Where(l1 => EF.Property>(l1, "OneToMany_Optional1").Where(l2 => l2.OneToOne_Optional_PK2.Name != "Foo").Count() > 0), + .Where( + l1 => EF.Property>(l1, "OneToMany_Optional1").Where(l2 => l2.OneToOne_Optional_PK2.Name != "Foo") + .Count() + > 0), elementAsserter: (e, a) => AssertInclude( e, a, new ExpectedInclude(e1 => e1.OneToMany_Optional1), new ExpectedInclude(e2 => e2.OneToOne_Optional_PK2, "OneToMany_Optional1"), @@ -1518,8 +1521,9 @@ public virtual Task Filtered_include_basic_OrderBy_Skip_Take(bool async) public virtual Task Filtered_include_basic_OrderBy_Skip_Take_EF_Property(bool async) => AssertQuery( async, - ss => ss.Set().Include(l1 => EF.Property>(l1, "OneToMany_Optional1") - .OrderBy(x => x.Name).Skip(1).Take(3)), + ss => ss.Set().Include( + l1 => EF.Property>(l1, "OneToMany_Optional1") + .OrderBy(x => x.Name).Skip(1).Take(3)), elementAsserter: (e, a) => AssertInclude( e, a, new ExpectedFilteredInclude( @@ -1577,8 +1581,9 @@ public virtual Task Filtered_include_on_ThenInclude_EF_Property(bool async) async, ss => ss.Set() .Include(l1 => EF.Property(l1, "OneToOne_Optional_FK1")) - .ThenInclude(l2 => EF.Property>(l2, "OneToMany_Optional2") - .Where(x => x.Name != "Foo").OrderBy(x => x.Name).Skip(1).Take(3)), + .ThenInclude( + l2 => EF.Property>(l2, "OneToMany_Optional2") + .Where(x => x.Name != "Foo").OrderBy(x => x.Name).Skip(1).Take(3)), elementAsserter: (e, a) => AssertInclude( e, a, new ExpectedInclude(e => e.OneToOne_Optional_FK1), @@ -2351,15 +2356,14 @@ public virtual Task Projecting_collection_after_optional_reference_correlated_wi ss => ss.Set().Select( l1 => new { - Id = l1.Id, + l1.Id, Collection = l1.OneToOne_Optional_FK1.OneToMany_Optional2.Select( l3 => new { ChildId = l3.Id, ParentName = l1.OneToOne_Optional_FK1.Name }) }), - ss => ss.Set().Select( l1 => new { - Id = l1.Id, + l1.Id, Collection = l1.Maybe( x => x.OneToOne_Optional_FK1.Maybe( xx => xx.OneToMany_Optional2.Select( @@ -2369,7 +2373,6 @@ public virtual Task Projecting_collection_after_optional_reference_correlated_wi ParentName = l1.OneToOne_Optional_FK1.Maybe(xxx => xxx.Name) }))) }), - elementSorter: e => e.Id, elementAsserter: (e, a) => { @@ -2389,22 +2392,20 @@ public virtual Task Projecting_collection_with_group_by_after_optional_reference ss => ss.Set().Select( l1 => new { - Id = l1.Id, + l1.Id, Entity = l1.OneToOne_Optional_FK1.OneToOne_Optional_FK2, Collection = l1.OneToOne_Optional_FK1.OneToMany_Optional2.GroupBy(x => x.Name) .Select(g => new { g.Key, Count = g.Count() }) }), - ss => ss.Set().Select( l1 => new { - Id = l1.Id, + l1.Id, Entity = l1.OneToOne_Optional_FK1.OneToOne_Optional_FK2, Collection = l1.Maybe( x => x.OneToOne_Optional_FK1.Maybe( xx => xx.OneToMany_Optional2.GroupBy(x => x.Name).Select(g => new { g.Key, Count = g.Count() }))) }), - elementSorter: e => e.Id, elementAsserter: (e, a) => { diff --git a/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs index 21e5fc23f29..cb866d1035f 100644 --- a/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs @@ -1351,7 +1351,6 @@ public virtual Task Multiple_required_navigation_with_string_based_Include(bool .Include("OneToOne_Optional_FK2"), elementAsserter: (e, a) => AssertInclude(e, a, new ExpectedInclude(l2 => l2.OneToOne_Optional_FK2)))); - [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Multiple_required_navigation_with_EF_Property_Include(bool async) diff --git a/test/EFCore.Specification.Tests/Query/GearsOfWarQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/GearsOfWarQueryTestBase.cs index 48ca2e69ce2..17ad3425ca2 100644 --- a/test/EFCore.Specification.Tests/Query/GearsOfWarQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/GearsOfWarQueryTestBase.cs @@ -8164,20 +8164,16 @@ public virtual Task Enum_matching_take_value_gets_different_type_mapping(bool as [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Where_subquery_equality_to_null_with_composite_key(bool async) - { - return AssertQuery( + => AssertQuery( async, ss => ss.Set().Where(s => s.Members.OrderBy(e => e.Nickname).FirstOrDefault() == null)); - } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Where_subquery_equality_to_null_without_composite_key(bool async) - { - return AssertQuery( + => AssertQuery( async, ss => ss.Set().Where(s => s.Weapons.OrderBy(e => e.Name).FirstOrDefault() == null)); - } protected GearsOfWarContext CreateContext() => Fixture.CreateContext(); diff --git a/test/EFCore.Specification.Tests/Query/IncludeOneToOneTestBase.cs b/test/EFCore.Specification.Tests/Query/IncludeOneToOneTestBase.cs index 953af26f068..682ad761d4b 100644 --- a/test/EFCore.Specification.Tests/Query/IncludeOneToOneTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/IncludeOneToOneTestBase.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming namespace Microsoft.EntityFrameworkCore.Query; diff --git a/test/EFCore.Specification.Tests/Query/InheritanceQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/InheritanceQueryTestBase.cs index 66fa891c2d0..ed5ebd3ad86 100644 --- a/test/EFCore.Specification.Tests/Query/InheritanceQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/InheritanceQueryTestBase.cs @@ -300,7 +300,7 @@ public virtual Task Discriminator_used_when_projection_over_of_type(bool async) ss => ss.Set().OfType().Select(k => k.FoundOn)); [ConditionalFact] - public virtual void Can_insert_update_delete() + public virtual void Can_insert_update_delete() { int? eagleId = null; TestHelpers.ExecuteWithStrategyInTransaction( diff --git a/test/EFCore.Specification.Tests/Query/ManyToManyFieldsQueryFixtureBase.cs b/test/EFCore.Specification.Tests/Query/ManyToManyFieldsQueryFixtureBase.cs index 5d1cf2a5baf..94fc174240b 100644 --- a/test/EFCore.Specification.Tests/Query/ManyToManyFieldsQueryFixtureBase.cs +++ b/test/EFCore.Specification.Tests/Query/ManyToManyFieldsQueryFixtureBase.cs @@ -33,10 +33,7 @@ public ISetSource GetExpectedData() { typeof(EntityOne), e => ((EntityOne)e)?.Id }, { typeof(EntityTwo), e => ((EntityTwo)e)?.Id }, { typeof(EntityThree), e => ((EntityThree)e)?.Id }, - { - typeof(EntityCompositeKey), - e => (((EntityCompositeKey)e)?.Key1, ((EntityCompositeKey)e)?.Key2, ((EntityCompositeKey)e)?.Key3) - }, + { typeof(EntityCompositeKey), e => (((EntityCompositeKey)e)?.Key1, ((EntityCompositeKey)e)?.Key2, ((EntityCompositeKey)e)?.Key3) }, { typeof(EntityRoot), e => ((EntityRoot)e)?.Id }, { typeof(EntityBranch), e => ((EntityBranch)e)?.Id }, { typeof(EntityLeaf), e => ((EntityLeaf)e)?.Id }, diff --git a/test/EFCore.Specification.Tests/Query/ManyToManyQueryFixtureBase.cs b/test/EFCore.Specification.Tests/Query/ManyToManyQueryFixtureBase.cs index b9c44c38c87..21893d8449a 100644 --- a/test/EFCore.Specification.Tests/Query/ManyToManyQueryFixtureBase.cs +++ b/test/EFCore.Specification.Tests/Query/ManyToManyQueryFixtureBase.cs @@ -33,10 +33,7 @@ public ISetSource GetExpectedData() { typeof(EntityOne), e => ((EntityOne)e)?.Id }, { typeof(EntityTwo), e => ((EntityTwo)e)?.Id }, { typeof(EntityThree), e => ((EntityThree)e)?.Id }, - { - typeof(EntityCompositeKey), - e => (((EntityCompositeKey)e)?.Key1, ((EntityCompositeKey)e)?.Key2, ((EntityCompositeKey)e)?.Key3) - }, + { typeof(EntityCompositeKey), e => (((EntityCompositeKey)e)?.Key1, ((EntityCompositeKey)e)?.Key2, ((EntityCompositeKey)e)?.Key3) }, { typeof(EntityRoot), e => ((EntityRoot)e)?.Id }, { typeof(EntityBranch), e => ((EntityBranch)e)?.Id }, { typeof(EntityLeaf), e => ((EntityLeaf)e)?.Id }, diff --git a/test/EFCore.Specification.Tests/Query/ManyToManyQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/ManyToManyQueryTestBase.cs index 9d51894eb4f..96638703106 100644 --- a/test/EFCore.Specification.Tests/Query/ManyToManyQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/ManyToManyQueryTestBase.cs @@ -807,7 +807,8 @@ public virtual Task Skip_navigation_any_with_predicate_unidirectional(bool async public virtual Task Skip_navigation_contains_unidirectional(bool async) => AssertQuery( async, - ss => ss.Set().Where(e => e.ThreeSkipPayloadFullShared.Contains(new UnidirectionalEntityThree { Id = 1 })), + ss => ss.Set() + .Where(e => e.ThreeSkipPayloadFullShared.Contains(new UnidirectionalEntityThree { Id = 1 })), ss => ss.Set().Where(e => e.ThreeSkipPayloadFullShared.Select(i => i.Id).Contains(1)), entryCount: 3); @@ -849,7 +850,8 @@ public virtual Task Skip_navigation_order_by_reverse_first_or_default_unidirecti public virtual Task Skip_navigation_of_type_unidirectional(bool async) => AssertQuery( async, - ss => ss.Set().OrderBy(e => e.Key1).Select(e => e.RootSkipShared.OfType()), + ss => ss.Set().OrderBy(e => e.Key1) + .Select(e => e.RootSkipShared.OfType()), assertOrder: true, elementAsserter: (e, a) => AssertCollection(e, a), entryCount: 3); @@ -1075,7 +1077,8 @@ public virtual Task Filtered_include_skip_navigation_order_by_skip_take_unidirec public virtual Task Filtered_include_skip_navigation_where_then_include_skip_navigation_unidirectional(bool async) => AssertQuery( async, - ss => ss.Set().Include(e => e.CompositeKeySkipFull.Where(i => i.Key1 < 5)).ThenInclude(e => e.TwoSkipShared), + ss => ss.Set().Include(e => e.CompositeKeySkipFull.Where(i => i.Key1 < 5)) + .ThenInclude(e => e.TwoSkipShared), elementAsserter: (e, a) => AssertInclude( e, a, new ExpectedFilteredInclude( diff --git a/test/EFCore.Specification.Tests/Query/NorthwindEFPropertyIncludeQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindEFPropertyIncludeQueryTestBase.cs index 4d44c606a24..e24b06ac008 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindEFPropertyIncludeQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindEFPropertyIncludeQueryTestBase.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.ObjectModel; -using Microsoft.EntityFrameworkCore.Diagnostics.Internal; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.TestModels.Northwind; @@ -101,7 +99,8 @@ public override async Task Include_reference_dependent_already_tracked(bool asyn var orders = async - ? await context.Set().Include(o => EF.Property(o, "Customer")).Where(o => o.CustomerID == "ALFKI").ToListAsync() + ? await context.Set().Include(o => EF.Property(o, "Customer")).Where(o => o.CustomerID == "ALFKI") + .ToListAsync() : context.Set().Include(o => EF.Property(o, "Customer")).Where(o => o.CustomerID == "ALFKI").ToList(); Assert.Equal(6, orders.Count); diff --git a/test/EFCore.Specification.Tests/Query/NorthwindFunctionsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindFunctionsQueryTestBase.cs index a2a97cd9ebf..879031ceef8 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindFunctionsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindFunctionsQueryTestBase.cs @@ -168,11 +168,7 @@ public virtual Task String_Join_over_non_nullable_column(bool async) async, ss => ss.Set() .GroupBy(c => c.City) - .Select(g => new - { - City = g.Key, - Customers = string.Join("|", g.Select(e => e.CustomerID)) - }), + .Select(g => new { City = g.Key, Customers = string.Join("|", g.Select(e => e.CustomerID)) }), elementSorter: x => x.City, elementAsserter: (e, a) => { @@ -191,11 +187,11 @@ public virtual Task String_Join_with_predicate(bool async) async, ss => ss.Set() .GroupBy(c => c.City) - .Select(g => new - { - City = g.Key, - Customers = string.Join("|", g.Where(e => e.ContactName.Length > 10).Select(e => e.CustomerID)) - }), + .Select( + g => new + { + City = g.Key, Customers = string.Join("|", g.Where(e => e.ContactName.Length > 10).Select(e => e.CustomerID)) + }), elementSorter: x => x.City, elementAsserter: (e, a) => { @@ -214,11 +210,11 @@ public virtual Task String_Join_with_ordering(bool async) async, ss => ss.Set() .GroupBy(c => c.City) - .Select(g => new - { - City = g.Key, - Customers = string.Join("|", g.OrderByDescending(e => e.CustomerID).Select(e => e.CustomerID)) - }), + .Select( + g => new + { + City = g.Key, Customers = string.Join("|", g.OrderByDescending(e => e.CustomerID).Select(e => e.CustomerID)) + }), elementSorter: x => x.City); [ConditionalTheory] @@ -228,11 +224,7 @@ public virtual Task String_Join_over_nullable_column(bool async) async, ss => ss.Set() .GroupBy(c => c.City) - .Select(g => new - { - City = g.Key, - Regions = string.Join("|", g.Select(e => e.Region)) - }), + .Select(g => new { City = g.Key, Regions = string.Join("|", g.Select(e => e.Region)) }), elementSorter: x => x.City, elementAsserter: (e, a) => { @@ -251,11 +243,7 @@ public virtual Task String_Concat(bool async) async, ss => ss.Set() .GroupBy(c => c.City) - .Select(g => new - { - City = g.Key, - Customers = string.Concat(g.Select(e => e.CustomerID)) - }), + .Select(g => new { City = g.Key, Customers = string.Concat(g.Select(e => e.CustomerID)) }), elementSorter: x => x.City, elementAsserter: (e, a) => { @@ -913,11 +901,7 @@ public virtual Task Sum_over_round_works_correctly_in_projection(bool async) async, ss => ss.Set() .Where(o => o.OrderID < 10300) - .Select(o => new - { - o.OrderID, - Sum = o.OrderDetails.Sum(i => Math.Round(i.UnitPrice, 2)) - }), + .Select(o => new { o.OrderID, Sum = o.OrderDetails.Sum(i => Math.Round(i.UnitPrice, 2)) }), elementSorter: e => e.OrderID, elementAsserter: (e, a) => { @@ -932,11 +916,7 @@ public virtual Task Sum_over_round_works_correctly_in_projection_2(bool async) async, ss => ss.Set() .Where(o => o.OrderID < 10300) - .Select(o => new - { - o.OrderID, - Sum = o.OrderDetails.Select(i => i.UnitPrice * i.UnitPrice).Sum(i => Math.Round(i, 2)) - }), + .Select(o => new { o.OrderID, Sum = o.OrderDetails.Select(i => i.UnitPrice * i.UnitPrice).Sum(i => Math.Round(i, 2)) }), elementSorter: e => e.OrderID, elementAsserter: (e, a) => { @@ -951,11 +931,7 @@ public virtual Task Sum_over_truncate_works_correctly_in_projection(bool async) async, ss => ss.Set() .Where(o => o.OrderID < 10300) - .Select(o => new - { - o.OrderID, - Sum = o.OrderDetails.Sum(i => Math.Truncate(i.UnitPrice)) - }), + .Select(o => new { o.OrderID, Sum = o.OrderDetails.Sum(i => Math.Truncate(i.UnitPrice)) }), elementSorter: e => e.OrderID, elementAsserter: (e, a) => { @@ -970,11 +946,7 @@ public virtual Task Sum_over_truncate_works_correctly_in_projection_2(bool async async, ss => ss.Set() .Where(o => o.OrderID < 10300) - .Select(o => new - { - o.OrderID, - Sum = o.OrderDetails.Select(i => i.UnitPrice * i.UnitPrice).Sum(i => Math.Truncate(i)) - }), + .Select(o => new { o.OrderID, Sum = o.OrderDetails.Select(i => i.UnitPrice * i.UnitPrice).Sum(i => Math.Truncate(i)) }), elementSorter: e => e.OrderID, elementAsserter: (e, a) => { diff --git a/test/EFCore.Specification.Tests/Query/NorthwindGroupByQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindGroupByQueryTestBase.cs index 965477edae0..7ff3f0dda9f 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindGroupByQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindGroupByQueryTestBase.cs @@ -1561,7 +1561,7 @@ public virtual Task GroupBy_complex_key_aggregate(bool async) async, ss => ss.Set() .GroupBy(o => o.Customer.CustomerID.Substring(0, 1)) - .Select(g => new { Key = g.Key, Count = g.Count() }), + .Select(g => new { g.Key, Count = g.Count() }), elementSorter: e => (e.Key, e.Count), elementAsserter: (e, a) => { @@ -1852,19 +1852,17 @@ from g in grouping [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Join_GroupBy_Aggregate_distinct_single_join(bool async) - { - return AssertQuery( + => AssertQuery( async, ss => from c in ss.Set() join a in ss.Set().GroupBy(o => new { o.CustomerID, o.OrderDate.Value.Year }) .Where(g => g.Count() > 5) - .Select(g => new { CustomerID = g.Key.CustomerID, LastOrderID = g.Max(o => o.OrderID) }) + .Select(g => new { g.Key.CustomerID, LastOrderID = g.Max(o => o.OrderID) }) .Distinct() on c.CustomerID equals a.CustomerID select new { c, a.LastOrderID }, entryCount: 31); - } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -2666,7 +2664,7 @@ public virtual Task GroupBy_complex_key_without_aggregate(bool async) async, ss => ss.Set() .GroupBy(o => o.Customer.CustomerID.Substring(0, 1)) - .Select(g => new { Key = g.Key, Count = g.Skip(1).Take(2) }), + .Select(g => new { g.Key, Count = g.Skip(1).Take(2) }), elementSorter: e => (e.Key, e.Count), elementAsserter: (e, a) => { diff --git a/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs index 2069a2dadf4..dc6b8326cf7 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs @@ -30,8 +30,8 @@ public virtual async Task Multiple_context_instances(bool async) using var context1 = CreateContext(); using var context2 = CreateContext(); - var message = async ? - (await Assert.ThrowsAsync( + var message = async + ? (await Assert.ThrowsAsync( () => (from c in context1.Customers from o in context2.Orders select c).FirstAsync())).Message @@ -50,8 +50,8 @@ public virtual async Task Multiple_context_instances_2(bool async) using var context1 = CreateContext(); using var context2 = CreateContext(); - var message = async ? - (await Assert.ThrowsAsync( + var message = async + ? (await Assert.ThrowsAsync( () => (from c in context1.Customers from o in context2.Set() select c).FirstAsync())).Message @@ -71,8 +71,8 @@ public virtual async Task Multiple_context_instances_set(bool async) using var context2 = CreateContext(); var set = context2.Orders; - var message = async ? - (await Assert.ThrowsAsync( + var message = async + ? (await Assert.ThrowsAsync( () => (from c in context1.Customers from o in set select c).FirstAsync())).Message @@ -91,8 +91,8 @@ public virtual async Task Multiple_context_instances_parameter(bool async) using var context1 = CreateContext(); using var context2 = CreateContext(); - var message = async ? - (await Assert.ThrowsAsync( + var message = async + ? (await Assert.ThrowsAsync( () => queryAsync(context2))).Message : Assert.Throws( () => query(context2)).Message; @@ -1304,7 +1304,8 @@ public virtual Task Select_DTO_constructor_distinct_with_collection_projection_t [ConditionalTheory] [MemberData(nameof(IsAsyncData))] - public virtual async Task Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(bool async) + public virtual async Task + Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(bool async) { using var context = CreateContext(); var actualQuery = context.Set() @@ -1398,9 +1399,9 @@ public virtual Task Select_DTO_with_member_init_distinct_in_subquery_used_in_pro async, ss => from c in ss.Set().Where(c => c.CustomerID.StartsWith("A")) from o in ss.Set() - .Where(o => o.OrderID < 10300) - .Select(o => new OrderCountDTO { Id = o.CustomerID, Count = o.OrderID }) - .Distinct() + .Where(o => o.OrderID < 10300) + .Select(o => new OrderCountDTO { Id = o.CustomerID, Count = o.OrderID }) + .Distinct() select new { c, o }, elementSorter: e => (e.c.CustomerID, e.o.Count), elementAsserter: (e, a) => @@ -2951,8 +2952,8 @@ public virtual Task Selected_column_can_coalesce(bool async) => AssertQuery( async, ss => (from c in ss.Set() - orderby c.Region ?? "ZZ" - select c).Select(x => x), + orderby c.Region ?? "ZZ" + select c).Select(x => x), entryCount: 91); [ConditionalFact] @@ -2996,7 +2997,7 @@ select c .City == "Seattle" select od) - .Take(2), + .Take(2), entryCount: 2); [ConditionalTheory] @@ -3017,7 +3018,7 @@ select c .City == "Seattle" select od) - .Take(2), + .Take(2), entryCount: 2); [ConditionalTheory] @@ -3026,7 +3027,7 @@ public virtual Task Select_Where_Subquery_Equality(bool async) => AssertQuery( async, ss => from o in ss.Set().OrderBy(o => o.OrderID).Take(1) - // ReSharper disable once UseMethodAny.0 + // ReSharper disable once UseMethodAny.0 where (from od in ss.Set().OrderBy(od => od.OrderID).Take(2) where (from c in ss.Set() where c.CustomerID == o.CustomerID @@ -3513,10 +3514,11 @@ public virtual Task Parameter_extraction_can_throw_exception_from_user_code_2(bo () => AssertQuery( async, ss => ss.Set() - .Where(o => (o.OrderID < 10400) - && o.OrderDate.HasValue - && o.OrderDate.Value.Month == dateFilter.Value.Month - && o.OrderDate.Value.Year == dateFilter.Value.Year))); + .Where( + o => (o.OrderID < 10400) + && o.OrderDate.HasValue + && o.OrderDate.Value.Month == dateFilter.Value.Month + && o.OrderDate.Value.Year == dateFilter.Value.Year))); } [ConditionalTheory] @@ -5277,7 +5279,6 @@ public virtual Task String_include_on_incorrect_property_throws(bool async) => Assert.ThrowsAsync( async () => await AssertQuery(async, ss => ss.Set().Include("OrderDetails"))); - [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task EF_Property_include_on_incorrect_property_throws(bool async) diff --git a/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs index 46c06a7ccf4..993dfec7ff2 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs @@ -2444,20 +2444,17 @@ public virtual Task Using_enumerable_parameter_in_projection(bool async) [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task List_from_result_of_single_result(bool async) - { - return AssertFirstOrDefault( + => AssertFirstOrDefault( async, ss => ss.Set() .OrderBy(c => c.CustomerID) .Select(c => c.Orders.Select(e => e.OrderID)), asserter: (e, a) => AssertCollection(e, a, elementSorter: e => e, elementAsserter: (ee, aa) => AssertEqual(ee, aa))); - } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task List_from_result_of_single_result_2(bool async) - { - return AssertFirstOrDefault( + => AssertFirstOrDefault( async, ss => ss.Set() .OrderBy(c => c.CustomerID) @@ -2469,13 +2466,11 @@ public virtual Task List_from_result_of_single_result_2(bool async) AssertEqual(ee.OrderID, aa.OrderID); AssertEqual(ee.OrderDate, aa.OrderDate); })); - } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task List_from_result_of_single_result_3(bool async) - { - return AssertFirstOrDefault( + => AssertFirstOrDefault( async, ss => ss.Set() .OrderBy(c => c.CustomerID) @@ -2483,5 +2478,4 @@ public virtual Task List_from_result_of_single_result_3(bool async) c => c.Orders.OrderBy(o => o.OrderDate) .Select(e => e.OrderDetails.Select(od => od.ProductID)).FirstOrDefault()), asserter: (e, a) => AssertCollection(e, a, elementSorter: e => e, elementAsserter: (ee, aa) => AssertEqual(ee, aa))); - } } diff --git a/test/EFCore.Specification.Tests/Query/NorthwindSetOperationsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindSetOperationsQueryTestBase.cs index a72a933a872..df1e88d8f12 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindSetOperationsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindSetOperationsQueryTestBase.cs @@ -414,10 +414,11 @@ public virtual async Task Include_Union_different_includes_throws(bool async) ss => ss.Set() .Where(c => c.City == "Berlin") .Include(c => c.Orders) - .Union(ss.Set() - .Where(c => c.City == "London") - .Include(c => c.Orders) - .ThenInclude(o => o.OrderDetails))))).Message; + .Union( + ss.Set() + .Where(c => c.City == "London") + .Include(c => c.Orders) + .ThenInclude(o => o.OrderDetails))))).Message; Assert.Equal(CoreStrings.SetOperationWithDifferentIncludesInOperands, message); } diff --git a/test/EFCore.Specification.Tests/Query/NorthwindWhereQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindWhereQueryTestBase.cs index 3ffb7ba952d..0ab7ee3cc27 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindWhereQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindWhereQueryTestBase.cs @@ -1066,7 +1066,7 @@ public virtual Task Where_select_many_and(bool async) ss => from c in ss.Set() from e in ss.Set() - // ReSharper disable ArrangeRedundantParentheses + // ReSharper disable ArrangeRedundantParentheses #pragma warning disable RCS1032 // Remove redundant parentheses. where (c.City == "London" && c.Country == "UK") && (e.City == "London" && e.Country == "UK") diff --git a/test/EFCore.Specification.Tests/Query/NullKeysTestBase.cs b/test/EFCore.Specification.Tests/Query/NullKeysTestBase.cs index ccdd87a98f2..b6e9b21c4cc 100644 --- a/test/EFCore.Specification.Tests/Query/NullKeysTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NullKeysTestBase.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public abstract class NullKeysTestBase : IClassFixture diff --git a/test/EFCore.Specification.Tests/Query/OwnedEntityQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/OwnedEntityQueryTestBase.cs index cc98794b1c0..964825f7010 100644 --- a/test/EFCore.Specification.Tests/Query/OwnedEntityQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/OwnedEntityQueryTestBase.cs @@ -229,8 +229,7 @@ public virtual async Task Projecting_correlated_collection_property_for_owned_en var query = context.Warehouses.Select( x => new WarehouseModel { - WarehouseCode = x.WarehouseCode, - DestinationCountryCodes = x.DestinationCountries.Select(c => c.CountryCode).ToArray() + WarehouseCode = x.WarehouseCode, DestinationCountryCodes = x.DestinationCountries.Select(c => c.CountryCode).ToArray() }).AsNoTracking(); var result = async diff --git a/test/EFCore.Specification.Tests/Query/OwnedQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/OwnedQueryTestBase.cs index d9cbbd34565..594523f5483 100644 --- a/test/EFCore.Specification.Tests/Query/OwnedQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/OwnedQueryTestBase.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public abstract class OwnedQueryTestBase : QueryTestBase @@ -21,17 +20,13 @@ public virtual async Task Can_query_owner_with_different_owned_types_having_same { using (var context = CreateContext()) { - context.Add(new HeliumBalloon - { - Id = Guid.NewGuid().ToString(), - Gas = new Helium(), - }); + context.Add( + new HeliumBalloon + { + Id = Guid.NewGuid().ToString(), Gas = new Helium(), + }); - context.Add(new HydrogenBalloon - { - Id = Guid.NewGuid().ToString(), - Gas = new Hydrogen() - }); + context.Add(new HydrogenBalloon { Id = Guid.NewGuid().ToString(), Gas = new Hydrogen() }); _ = async ? await context.SaveChangesAsync() : context.SaveChanges(); } @@ -840,7 +835,14 @@ public virtual Task Left_join_on_entity_with_owned_navigations(bool async) ss => from c1 in ss.Set() join c2 in ss.Set() on c1.Id equals c2.Id into grouping from c2 in grouping.DefaultIfEmpty() - select new { c1, c2.Id, c2, c2.Orders, c2.PersonAddress }, + select new + { + c1, + c2.Id, + c2, + c2.Orders, + c2.PersonAddress + }, elementSorter: e => (e.c1.Id, e.c2.Id), elementAsserter: (e, a) => { @@ -857,14 +859,19 @@ public virtual Task Left_join_on_entity_with_owned_navigations_complex(bool asyn => AssertQuery( async, ss => - from o in ss.Set() - join sub in ( - from c1 in ss.Set() - join c2 in ss.Set() on c1.Id equals c2.Id into grouping - from c2 in grouping.DefaultIfEmpty() - select new { c1, c2.Id, c2 }).Distinct() on o.Id equals sub.Id into grouping2 - from sub in grouping2.DefaultIfEmpty() - select new { o, sub }, + from o in ss.Set() + join sub in ( + from c1 in ss.Set() + join c2 in ss.Set() on c1.Id equals c2.Id into grouping + from c2 in grouping.DefaultIfEmpty() + select new + { + c1, + c2.Id, + c2 + }).Distinct() on o.Id equals sub.Id into grouping2 + from sub in grouping2.DefaultIfEmpty() + select new { o, sub }, elementSorter: e => (e.o.Id, e.sub.c1.Id, e.sub.Id), elementAsserter: (e, a) => { @@ -1449,7 +1456,14 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con }); }); - modelBuilder.Entity(pb => pb.HasData(new Planet { Id = 1, StarId = 1, Name = "Earth" })); + modelBuilder.Entity( + pb => pb.HasData( + new Planet + { + Id = 1, + StarId = 1, + Name = "Earth" + })); modelBuilder.Entity( mb => mb.HasData( @@ -1592,7 +1606,15 @@ public virtual IQueryable Set() } private static IReadOnlyList CreatePlanets() - => new List { new() { Id = 1, StarId = 1, Name = "Earth" } }; + => new List + { + new() + { + Id = 1, + StarId = 1, + Name = "Earth" + } + }; private static IReadOnlyList CreateStars() => new List diff --git a/test/EFCore.Specification.Tests/Query/SimpleQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/SimpleQueryTestBase.cs index c4b07da3f78..05bac0d55f5 100644 --- a/test/EFCore.Specification.Tests/Query/SimpleQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/SimpleQueryTestBase.cs @@ -691,9 +691,7 @@ public Context26472(DbContextOptions options) public virtual DbSet OrderItems { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.Entity().Property(x => x.Type).HasConversion(); - } + => modelBuilder.Entity().Property(x => x.Type).HasConversion(); } protected class Order26472 @@ -1108,11 +1106,11 @@ public void Seed() { Children = new List { - new Child26744 { SomeInteger = 1, SomeOtherNullableDateTime = new DateTime(2000, 11, 18) } + new() { SomeInteger = 1, SomeOtherNullableDateTime = new DateTime(2000, 11, 18) } } }); - Add(new Parent26744 { Children = new List { new Child26744 { SomeInteger = 1, } } }); + Add(new Parent26744 { Children = new List { new() { SomeInteger = 1, } } }); SaveChanges(); } @@ -1165,10 +1163,7 @@ public Context27343(DbContextOptions options) public DbSet Parents { get; set; } public void Seed() - { - - SaveChanges(); - } + => SaveChanges(); } protected interface IDocumentType27343 @@ -1194,9 +1189,7 @@ protected class Child27343 [ConditionalTheory] [MemberData(nameof(IsAsyncData))] public virtual Task Hierarchy_query_with_abstract_type_sibling(bool async) - { - return Hierarchy_query_with_abstract_type_sibling_helper(async, null); - } + => Hierarchy_query_with_abstract_type_sibling_helper(async, null); public virtual async Task Hierarchy_query_with_abstract_type_sibling_helper(bool async, Action onModelCreating) { @@ -1270,7 +1263,6 @@ public virtual async Task Pushdown_does_not_add_grouping_key_to_projection_when_ var contextFactory = await InitializeAsync(); using var db = contextFactory.CreateContext(); - var queryResults = (from i in db.IndexData.Where(a => a.Parcel == "some condition") .Select(a => new SearchResult { ParcelNumber = a.Parcel, RowId = a.RowId }) group i by new { i.ParcelNumber, i.RowId } @@ -1284,7 +1276,6 @@ on dcv.ParcelNumber equals wos orderby dcv.ParcelNumber select dcv.JSON).Take(123456); - var result = async ? await jsonLookup.ToListAsync() : jsonLookup.ToList(); @@ -1307,7 +1298,6 @@ public class TableData : EntityBase public string ParcelNumber { get; set; } public short RowId { get; set; } public string JSON { get; set; } - } public abstract class EntityBase @@ -1329,7 +1319,6 @@ internal class SearchResult public string DistinctValue { get; set; } } - protected abstract class Animal { public int Id { get; set; } diff --git a/test/EFCore.Specification.Tests/Query/SpatialQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/SpatialQueryTestBase.cs index 5d6372135af..fa6c6d709a9 100644 --- a/test/EFCore.Specification.Tests/Query/SpatialQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/SpatialQueryTestBase.cs @@ -4,7 +4,6 @@ using Microsoft.EntityFrameworkCore.TestModels.SpatialModel; using NetTopologySuite.Geometries; using NetTopologySuite.Geometries.Utilities; -using NetTopologySuite.Operation.Polygonize; using NetTopologySuite.Operation.Union; namespace Microsoft.EntityFrameworkCore.Query; @@ -190,11 +189,7 @@ public virtual Task Combine_aggregate(bool async) ss => ss.Set() .Where(e => e.Point != null) .GroupBy(e => e.Group) - .Select(g => new - { - Id = g.Key, - Combined = GeometryCombiner.Combine(g.Select(e => e.Point)) - }), + .Select(g => new { Id = g.Key, Combined = GeometryCombiner.Combine(g.Select(e => e.Point)) }), elementSorter: x => x.Id, elementAsserter: (e, a) => { @@ -1135,11 +1130,7 @@ public virtual Task Union_aggregate(bool async) ss => ss.Set() .Where(e => e.Point != null) .GroupBy(e => e.Group) - .Select(g => new - { - Id = g.Key, - Union = UnaryUnionOp.Union(g.Select(e => e.Point)) - }), + .Select(g => new { Id = g.Key, Union = UnaryUnionOp.Union(g.Select(e => e.Point)) }), elementSorter: x => x.Id, elementAsserter: (e, a) => { diff --git a/test/EFCore.Specification.Tests/QueryExpressionInterceptionTestBase.cs b/test/EFCore.Specification.Tests/QueryExpressionInterceptionTestBase.cs index 91a3babf548..23400d5b962 100644 --- a/test/EFCore.Specification.Tests/QueryExpressionInterceptionTestBase.cs +++ b/test/EFCore.Specification.Tests/QueryExpressionInterceptionTestBase.cs @@ -106,7 +106,7 @@ protected override Expression VisitBinary(BinaryExpression node) } } - protected static void AssertNormalOutcome(DbContext context,TestQueryExpressionInterceptor interceptor) + protected static void AssertNormalOutcome(DbContext context, TestQueryExpressionInterceptor interceptor) { Assert.Same(context, interceptor.Context); Assert.True(interceptor.QueryCompilationStartingCalled); diff --git a/test/EFCore.Specification.Tests/SaveChangesInterceptionTestBase.cs b/test/EFCore.Specification.Tests/SaveChangesInterceptionTestBase.cs index e7b8874c0ab..5acdd3db63f 100644 --- a/test/EFCore.Specification.Tests/SaveChangesInterceptionTestBase.cs +++ b/test/EFCore.Specification.Tests/SaveChangesInterceptionTestBase.cs @@ -657,7 +657,7 @@ public virtual ValueTask ThrowingConcurrencyExceptionAsync( ConcurrencyExceptionCalled = true; AsyncCalled = true; - return new(result); + return new ValueTask(result); } } diff --git a/test/EFCore.Specification.Tests/StoreGeneratedTestBase.cs b/test/EFCore.Specification.Tests/StoreGeneratedTestBase.cs index 9a4a20f891c..1f791426274 100644 --- a/test/EFCore.Specification.Tests/StoreGeneratedTestBase.cs +++ b/test/EFCore.Specification.Tests/StoreGeneratedTestBase.cs @@ -1682,7 +1682,7 @@ public WrappedIntClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value.Equals(v2.Value)), v => v != null ? v.Value : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedIntClass { Value = v.Value }) { } } @@ -1765,7 +1765,7 @@ public WrappedIntKeyClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value.Equals(v2.Value)), v => v != null ? v.Value : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedIntKeyClass { Value = v.Value }) { } } @@ -1935,25 +1935,25 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key() var principal1 = context.Add( new WrappedIntClassPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedIntClassDependentShadow(), new WrappedIntClassDependentShadow() }, + OptionalDependents = { new WrappedIntClassDependentOptional(), new WrappedIntClassDependentOptional() }, + RequiredDependents = { new WrappedIntClassDependentRequired(), new WrappedIntClassDependentRequired() } }).Entity; var principal2 = context.Add( new WrappedIntStructPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedIntStructDependentShadow(), new WrappedIntStructDependentShadow() }, + OptionalDependents = { new WrappedIntStructDependentOptional(), new WrappedIntStructDependentOptional() }, + RequiredDependents = { new WrappedIntStructDependentRequired(), new WrappedIntStructDependentRequired() } }).Entity; var principal3 = context.Add( new WrappedIntRecordPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedIntRecordDependentShadow(), new WrappedIntRecordDependentShadow() }, + OptionalDependents = { new WrappedIntRecordDependentOptional(), new WrappedIntRecordDependentOptional() }, + RequiredDependents = { new WrappedIntRecordDependentRequired(), new WrappedIntRecordDependentRequired() } }).Entity; context.SaveChanges(); @@ -1966,12 +1966,14 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.NotEqual(0, dependent.Id.Value); Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.NotEqual(0, dependent.Id.Value); @@ -1989,12 +1991,14 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.NotEqual(0, dependent.Id.Value); Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.NotEqual(0, dependent.Id.Value); @@ -2012,12 +2016,14 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.NotEqual(0, dependent.Id.Value); Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.NotEqual(0, dependent.Id.Value); @@ -2041,11 +2047,13 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.Same(principal1, dependent.Principal); @@ -2064,11 +2072,13 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.Same(principal2, dependent.Principal); @@ -2087,11 +2097,13 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.Same(principal3, dependent.Principal); @@ -2207,7 +2219,7 @@ public WrappedStringClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value!.Equals(v2.Value)), v => v != null ? v.Value!.GetHashCode() : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedStringClass { Value = v.Value }) { } } @@ -2290,7 +2302,7 @@ public WrappedStringKeyClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value!.Equals(v2.Value)), v => v != null ? v.Value!.GetHashCode() : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedStringKeyClass { Value = v.Value }) { } } @@ -2344,8 +2356,12 @@ protected class WrappedStringClassPrincipal public WrappedStringClass? NonKey { get; set; } public ICollection Dependents { get; } = new List(); - public ICollection RequiredDependents { get; } = new List(); - public ICollection OptionalDependents { get; } = new List(); + + public ICollection RequiredDependents { get; } = + new List(); + + public ICollection OptionalDependents { get; } = + new List(); } protected class WrappedStringClassDependentShadow @@ -2381,8 +2397,12 @@ protected class WrappedStringStructPrincipal public WrappedStringStruct NonKey { get; set; } public ICollection Dependents { get; } = new List(); - public ICollection OptionalDependents { get; } = new List(); - public ICollection RequiredDependents { get; } = new List(); + + public ICollection OptionalDependents { get; } = + new List(); + + public ICollection RequiredDependents { get; } = + new List(); } protected class WrappedStringStructDependentShadow @@ -2418,8 +2438,12 @@ protected class WrappedStringRecordPrincipal public WrappedStringRecord? NonKey { get; set; } public ICollection Dependents { get; } = new List(); - public ICollection OptionalDependents { get; } = new List(); - public ICollection RequiredDependents { get; } = new List(); + + public ICollection OptionalDependents { get; } = + new List(); + + public ICollection RequiredDependents { get; } = + new List(); } protected class WrappedStringRecordDependentShadow @@ -2460,25 +2484,25 @@ public virtual void Insert_update_and_delete_with_wrapped_string_key() var principal1 = context.Add( new WrappedStringClassPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedStringClassDependentShadow(), new WrappedStringClassDependentShadow() }, + OptionalDependents = { new WrappedStringClassDependentOptional(), new WrappedStringClassDependentOptional() }, + RequiredDependents = { new WrappedStringClassDependentRequired(), new WrappedStringClassDependentRequired() } }).Entity; var principal2 = context.Add( new WrappedStringStructPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedStringStructDependentShadow(), new WrappedStringStructDependentShadow() }, + OptionalDependents = { new WrappedStringStructDependentOptional(), new WrappedStringStructDependentOptional() }, + RequiredDependents = { new WrappedStringStructDependentRequired(), new WrappedStringStructDependentRequired() } }).Entity; var principal3 = context.Add( new WrappedStringRecordPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedStringRecordDependentShadow(), new WrappedStringRecordDependentShadow() }, + OptionalDependents = { new WrappedStringRecordDependentOptional(), new WrappedStringRecordDependentOptional() }, + RequiredDependents = { new WrappedStringRecordDependentRequired(), new WrappedStringRecordDependentRequired() } }).Entity; context.SaveChanges(); @@ -2491,12 +2515,14 @@ public virtual void Insert_update_and_delete_with_wrapped_string_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.NotNull(dependent.Id.Value); Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.NotNull(dependent.Id.Value); @@ -2514,12 +2540,14 @@ public virtual void Insert_update_and_delete_with_wrapped_string_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.NotNull(dependent.Id.Value); Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.NotNull(dependent.Id.Value); @@ -2537,12 +2565,14 @@ public virtual void Insert_update_and_delete_with_wrapped_string_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.NotNull(dependent.Id.Value); Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.NotNull(dependent.Id.Value); @@ -2566,11 +2596,13 @@ public virtual void Insert_update_and_delete_with_wrapped_string_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.Same(principal1, dependent.Principal); @@ -2589,11 +2621,13 @@ public virtual void Insert_update_and_delete_with_wrapped_string_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.Same(principal2, dependent.Principal); @@ -2612,11 +2646,13 @@ public virtual void Insert_update_and_delete_with_wrapped_string_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.Same(principal3, dependent.Principal); @@ -2735,7 +2771,7 @@ public WrappedGuidClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value.Equals(v2.Value)), v => v != null ? v.Value.GetHashCode() : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedGuidClass { Value = v.Value }) { } } @@ -2818,7 +2854,7 @@ public WrappedGuidKeyClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value.Equals(v2.Value)), v => v != null ? v.Value.GetHashCode() : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedGuidKeyClass { Value = v.Value }) { } } @@ -2988,25 +3024,25 @@ public virtual void Insert_update_and_delete_with_wrapped_Guid_key() var principal1 = context.Add( new WrappedGuidClassPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedGuidClassDependentShadow(), new WrappedGuidClassDependentShadow() }, + OptionalDependents = { new WrappedGuidClassDependentOptional(), new WrappedGuidClassDependentOptional() }, + RequiredDependents = { new WrappedGuidClassDependentRequired(), new WrappedGuidClassDependentRequired() } }).Entity; var principal2 = context.Add( new WrappedGuidStructPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedGuidStructDependentShadow(), new WrappedGuidStructDependentShadow() }, + OptionalDependents = { new WrappedGuidStructDependentOptional(), new WrappedGuidStructDependentOptional() }, + RequiredDependents = { new WrappedGuidStructDependentRequired(), new WrappedGuidStructDependentRequired() } }).Entity; var principal3 = context.Add( new WrappedGuidRecordPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedGuidRecordDependentShadow(), new WrappedGuidRecordDependentShadow() }, + OptionalDependents = { new WrappedGuidRecordDependentOptional(), new WrappedGuidRecordDependentOptional() }, + RequiredDependents = { new WrappedGuidRecordDependentRequired(), new WrappedGuidRecordDependentRequired() } }).Entity; context.SaveChanges(); @@ -3019,12 +3055,14 @@ public virtual void Insert_update_and_delete_with_wrapped_Guid_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.NotEqual(Guid.Empty, dependent.Id.Value); Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.NotEqual(Guid.Empty, dependent.Id.Value); @@ -3042,12 +3080,14 @@ public virtual void Insert_update_and_delete_with_wrapped_Guid_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.NotEqual(Guid.Empty, dependent.Id.Value); Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.NotEqual(Guid.Empty, dependent.Id.Value); @@ -3065,12 +3105,14 @@ public virtual void Insert_update_and_delete_with_wrapped_Guid_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.NotEqual(Guid.Empty, dependent.Id.Value); Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.NotEqual(Guid.Empty, dependent.Id.Value); @@ -3094,11 +3136,13 @@ public virtual void Insert_update_and_delete_with_wrapped_Guid_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.Same(principal1, dependent.Principal); @@ -3117,11 +3161,13 @@ public virtual void Insert_update_and_delete_with_wrapped_Guid_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.Same(principal2, dependent.Principal); @@ -3140,11 +3186,13 @@ public virtual void Insert_update_and_delete_with_wrapped_Guid_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.Same(principal3, dependent.Principal); @@ -3260,7 +3308,7 @@ public WrappedUriClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value!.Equals(v2.Value)), v => v != null ? v.Value!.GetHashCode() : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedUriClass { Value = v.Value }) { } } @@ -3343,7 +3391,7 @@ public WrappedUriKeyClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value!.Equals(v2.Value)), v => v != null ? v.Value!.GetHashCode() : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedUriKeyClass { Value = v.Value }) { } } @@ -3516,25 +3564,25 @@ public virtual void Insert_update_and_delete_with_wrapped_Uri_key() var principal1 = context.Add( new WrappedUriClassPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedUriClassDependentShadow(), new WrappedUriClassDependentShadow() }, + OptionalDependents = { new WrappedUriClassDependentOptional(), new WrappedUriClassDependentOptional() }, + RequiredDependents = { new WrappedUriClassDependentRequired(), new WrappedUriClassDependentRequired() } }).Entity; var principal2 = context.Add( new WrappedUriStructPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedUriStructDependentShadow(), new WrappedUriStructDependentShadow() }, + OptionalDependents = { new WrappedUriStructDependentOptional(), new WrappedUriStructDependentOptional() }, + RequiredDependents = { new WrappedUriStructDependentRequired(), new WrappedUriStructDependentRequired() } }).Entity; var principal3 = context.Add( new WrappedUriRecordPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedUriRecordDependentShadow(), new WrappedUriRecordDependentShadow() }, + OptionalDependents = { new WrappedUriRecordDependentOptional(), new WrappedUriRecordDependentOptional() }, + RequiredDependents = { new WrappedUriRecordDependentRequired(), new WrappedUriRecordDependentRequired() } }).Entity; context.SaveChanges(); @@ -3547,12 +3595,14 @@ public virtual void Insert_update_and_delete_with_wrapped_Uri_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.NotNull(dependent.Id.Value); Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.NotNull(dependent.Id.Value); @@ -3570,12 +3620,14 @@ public virtual void Insert_update_and_delete_with_wrapped_Uri_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.NotNull(dependent.Id.Value); Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.NotNull(dependent.Id.Value); @@ -3593,12 +3645,14 @@ public virtual void Insert_update_and_delete_with_wrapped_Uri_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.NotNull(dependent.Id.Value); Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.NotNull(dependent.Id.Value); @@ -3622,11 +3676,13 @@ public virtual void Insert_update_and_delete_with_wrapped_Uri_key() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.Same(principal1, dependent.Principal); @@ -3645,11 +3701,13 @@ public virtual void Insert_update_and_delete_with_wrapped_Uri_key() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.Same(principal2, dependent.Principal); @@ -3668,11 +3726,13 @@ public virtual void Insert_update_and_delete_with_wrapped_Uri_key() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.Same(principal3, dependent.Principal); @@ -3813,9 +3873,9 @@ public virtual void Insert_update_and_delete_with_Uri_key() var principal1 = context.Add( new UriPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new UriDependentShadow(), new UriDependentShadow() }, + OptionalDependents = { new UriDependentOptional(), new UriDependentOptional() }, + RequiredDependents = { new UriDependentRequired(), new UriDependentRequired() } }).Entity; context.SaveChanges(); @@ -3932,9 +3992,9 @@ public virtual void Insert_update_and_delete_with_enum_key() var principal1 = context.Add( new EnumPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new EnumDependentShadow(), new EnumDependentShadow() }, + OptionalDependents = { new EnumDependentOptional(), new EnumDependentOptional() }, + RequiredDependents = { new EnumDependentRequired(), new EnumDependentRequired() } }).Entity; context.SaveChanges(); @@ -4041,9 +4101,9 @@ public virtual void Insert_update_and_delete_with_GuidAsString_key() var principal1 = context.Add( new GuidAsStringPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new GuidAsStringDependentShadow(), new GuidAsStringDependentShadow() }, + OptionalDependents = { new GuidAsStringDependentOptional(), new GuidAsStringDependentOptional() }, + RequiredDependents = { new GuidAsStringDependentRequired(), new GuidAsStringDependentRequired() } }).Entity; context.SaveChanges(); @@ -4150,9 +4210,9 @@ public virtual void Insert_update_and_delete_with_StringAsGuid_key() var principal1 = context.Add( new StringAsGuidPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new StringAsGuidDependentShadow(), new StringAsGuidDependentShadow() }, + OptionalDependents = { new StringAsGuidDependentOptional(), new StringAsGuidDependentOptional() }, + RequiredDependents = { new StringAsGuidDependentRequired(), new StringAsGuidDependentRequired() } }).Entity; context.SaveChanges(); diff --git a/test/EFCore.Specification.Tests/TestModels/ComplexNavigationsModel/ComplexNavigationsData.cs b/test/EFCore.Specification.Tests/TestModels/ComplexNavigationsModel/ComplexNavigationsData.cs index bc9c1dbbc20..badb8852308 100644 --- a/test/EFCore.Specification.Tests/TestModels/ComplexNavigationsModel/ComplexNavigationsData.cs +++ b/test/EFCore.Specification.Tests/TestModels/ComplexNavigationsModel/ComplexNavigationsData.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.TestModels.ComplexNavigationsModel; public abstract class ComplexNavigationsData : ISetSource diff --git a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/ManyToManyData.cs b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/ManyToManyData.cs index a45645550dc..99830cfe14c 100644 --- a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/ManyToManyData.cs +++ b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/ManyToManyData.cs @@ -87,8 +87,7 @@ public ManyToManyData(ManyToManyContext context, bool useGeneratedKeys) public IQueryable Set() where TEntity : class - { - return typeof(TEntity).Name switch + => typeof(TEntity).Name switch { nameof(EntityOne) => (IQueryable)_ones.AsQueryable(), nameof(EntityTwo) => (IQueryable)_twos.AsQueryable(), @@ -108,7 +107,6 @@ public IQueryable Set() .AsQueryable(), _ => throw new InvalidOperationException("Invalid entity type: " + typeof(TEntity)) }; - } private EntityOne[] CreateOnes(ManyToManyContext context) => new[] @@ -1187,7 +1185,6 @@ private static Dictionary CreateEntityRootEntityThree( e["RootSkipSharedId"] = context?.Entry(root).Property(e => e.Id).CurrentValue ?? root.Id; }); - private Dictionary[] CreateEntityRootEntityBranches(ManyToManyContext context) { var branches = _roots.OfType().ToList(); @@ -1333,17 +1330,28 @@ private UnidirectionalEntityTwo[] CreateUnidirectionalTwos(ManyToManyContext con CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 7, "EntityTwo 7", null, _unidirectionalOnes[4]), CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 8, "EntityTwo 8", null, _unidirectionalOnes[6]), CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 9, "EntityTwo 9", null, _unidirectionalOnes[6]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 10, "EntityTwo 10", _unidirectionalOnes[19], _unidirectionalOnes[8]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 11, "EntityTwo 11", _unidirectionalOnes[17], _unidirectionalOnes[8]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 12, "EntityTwo 12", _unidirectionalOnes[15], _unidirectionalOnes[10]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 13, "EntityTwo 13", _unidirectionalOnes[13], _unidirectionalOnes[10]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 14, "EntityTwo 14", _unidirectionalOnes[11], _unidirectionalOnes[12]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 15, "EntityTwo 15", _unidirectionalOnes[10], _unidirectionalOnes[12]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 16, "EntityTwo 16", _unidirectionalOnes[8], _unidirectionalOnes[14]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 17, "EntityTwo 17", _unidirectionalOnes[6], _unidirectionalOnes[14]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 18, "EntityTwo 18", _unidirectionalOnes[4], _unidirectionalOnes[15]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 19, "EntityTwo 19", _unidirectionalOnes[2], _unidirectionalOnes[15]), - CreateUnidirectionalEntityTwo(context, _useGeneratedKeys ? 0 : 20, "EntityTwo 20", _unidirectionalOnes[0], _unidirectionalOnes[16]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 10, "EntityTwo 10", _unidirectionalOnes[19], _unidirectionalOnes[8]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 11, "EntityTwo 11", _unidirectionalOnes[17], _unidirectionalOnes[8]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 12, "EntityTwo 12", _unidirectionalOnes[15], _unidirectionalOnes[10]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 13, "EntityTwo 13", _unidirectionalOnes[13], _unidirectionalOnes[10]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 14, "EntityTwo 14", _unidirectionalOnes[11], _unidirectionalOnes[12]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 15, "EntityTwo 15", _unidirectionalOnes[10], _unidirectionalOnes[12]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 16, "EntityTwo 16", _unidirectionalOnes[8], _unidirectionalOnes[14]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 17, "EntityTwo 17", _unidirectionalOnes[6], _unidirectionalOnes[14]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 18, "EntityTwo 18", _unidirectionalOnes[4], _unidirectionalOnes[15]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 19, "EntityTwo 19", _unidirectionalOnes[2], _unidirectionalOnes[15]), + CreateUnidirectionalEntityTwo( + context, _useGeneratedKeys ? 0 : 20, "EntityTwo 20", _unidirectionalOnes[0], _unidirectionalOnes[16]), }; private static UnidirectionalEntityTwo CreateUnidirectionalEntityTwo( @@ -1368,24 +1376,35 @@ private UnidirectionalEntityThree[] CreateUnidirectionalThrees(ManyToManyContext => new[] { CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 1, "EntityThree 1", null, null), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 2, "EntityThree 2", _unidirectionalTwos[18], _unidirectionalTwos[16]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 3, "EntityThree 3", _unidirectionalTwos[1], _unidirectionalTwos[15]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 4, "EntityThree 4", _unidirectionalTwos[19], _unidirectionalTwos[15]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 5, "EntityThree 5", _unidirectionalTwos[3], _unidirectionalTwos[14]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 2, "EntityThree 2", _unidirectionalTwos[18], _unidirectionalTwos[16]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 3, "EntityThree 3", _unidirectionalTwos[1], _unidirectionalTwos[15]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 4, "EntityThree 4", _unidirectionalTwos[19], _unidirectionalTwos[15]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 5, "EntityThree 5", _unidirectionalTwos[3], _unidirectionalTwos[14]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 6, "EntityThree 6", null, _unidirectionalTwos[14]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 7, "EntityThree 7", _unidirectionalTwos[5], _unidirectionalTwos[12]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 7, "EntityThree 7", _unidirectionalTwos[5], _unidirectionalTwos[12]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 8, "EntityThree 8", null, _unidirectionalTwos[12]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 9, "EntityThree 9", _unidirectionalTwos[7], _unidirectionalTwos[10]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 9, "EntityThree 9", _unidirectionalTwos[7], _unidirectionalTwos[10]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 10, "EntityThree 10", null, _unidirectionalTwos[10]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 11, "EntityThree 11", _unidirectionalTwos[18], _unidirectionalTwos[8]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 11, "EntityThree 11", _unidirectionalTwos[18], _unidirectionalTwos[8]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 12, "EntityThree 12", null, _unidirectionalTwos[8]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 13, "EntityThree 13", _unidirectionalTwos[11], _unidirectionalTwos[6]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 13, "EntityThree 13", _unidirectionalTwos[11], _unidirectionalTwos[6]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 14, "EntityThree 14", null, _unidirectionalTwos[6]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 15, "EntityThree 15", _unidirectionalTwos[13], _unidirectionalTwos[4]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 15, "EntityThree 15", _unidirectionalTwos[13], _unidirectionalTwos[4]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 16, "EntityThree 16", null, _unidirectionalTwos[4]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 17, "EntityThree 17", _unidirectionalTwos[15], _unidirectionalTwos[2]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 17, "EntityThree 17", _unidirectionalTwos[15], _unidirectionalTwos[2]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 18, "EntityThree 18", null, _unidirectionalTwos[2]), - CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 19, "EntityThree 19", _unidirectionalTwos[17], _unidirectionalTwos[0]), + CreateUnidirectionalEntityThree( + context, _useGeneratedKeys ? 0 : 19, "EntityThree 19", _unidirectionalTwos[17], _unidirectionalTwos[0]), CreateUnidirectionalEntityThree(context, _useGeneratedKeys ? 0 : 20, "EntityThree 20", null, _unidirectionalTwos[0]), }; @@ -1526,37 +1545,68 @@ private static UnidirectionalEntityLeaf CreateUnidirectionalEntityLeaf( private UnidirectionalJoinCompositeKeyToLeaf[] CreateUnidirectionalJoinCompositeKeyToLeaves(ManyToManyContext context) => new[] { - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[0]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[1]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[1]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[2]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[2]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[3]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[4]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[5]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[7]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[7]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[8]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[9]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[10]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[10]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[12]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[12]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[12]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[13]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[13]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[13]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[14]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[14]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[15]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[15]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[15]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[16]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[16]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[17]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[17]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[18]), - CreateUnidirectionalJoinCompositeKeyToLeaf(context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[18]) + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[0]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[1]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[1]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[2]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[2]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[3]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[4]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[5]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[7]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[7]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[8]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[9]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[10]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[10]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[12]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[12]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[12]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[13]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[13]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[13]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[14]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[14]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[15]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[15]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[15]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[16]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[16]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[18], _unidirectionalCompositeKeys[17]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[19], _unidirectionalCompositeKeys[17]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[16], _unidirectionalCompositeKeys[18]), + CreateUnidirectionalJoinCompositeKeyToLeaf( + context, (UnidirectionalEntityLeaf)_unidirectionalRoots[17], _unidirectionalCompositeKeys[18]) }; private static UnidirectionalJoinCompositeKeyToLeaf CreateUnidirectionalJoinCompositeKeyToLeaf( @@ -1573,35 +1623,64 @@ private static UnidirectionalJoinCompositeKeyToLeaf CreateUnidirectionalJoinComp private UnidirectionalJoinOneSelfPayload[] CreateUnidirectionalJoinOneSelfPayloads(ManyToManyContext context) => new[] { - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[2], _unidirectionalOnes[3], DateTime.Parse("2020-01-11 19:26:36")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[2], _unidirectionalOnes[5], DateTime.Parse("2005-10-03 12:57:54")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[2], _unidirectionalOnes[7], DateTime.Parse("2015-12-20 01:09:24")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[2], _unidirectionalOnes[17], DateTime.Parse("1999-12-26 02:51:57")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[2], _unidirectionalOnes[19], DateTime.Parse("2011-06-15 19:08:00")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[4], _unidirectionalOnes[2], DateTime.Parse("2019-12-08 05:40:16")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[4], _unidirectionalOnes[3], DateTime.Parse("2014-03-09 12:58:26")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[5], _unidirectionalOnes[4], DateTime.Parse("2014-05-15 16:34:38")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[5], _unidirectionalOnes[6], DateTime.Parse("2014-03-08 18:59:49")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[5], _unidirectionalOnes[12], DateTime.Parse("2013-12-10 07:01:53")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[6], _unidirectionalOnes[12], DateTime.Parse("2005-05-31 02:21:16")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[7], _unidirectionalOnes[8], DateTime.Parse("2011-12-31 19:37:25")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[7], _unidirectionalOnes[10], DateTime.Parse("2012-08-02 16:33:07")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[7], _unidirectionalOnes[11], DateTime.Parse("2018-07-19 09:10:12")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[9], _unidirectionalOnes[6], DateTime.Parse("2018-12-28 01:21:23")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[12], _unidirectionalOnes[1], DateTime.Parse("2014-03-22 02:20:06")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[12], _unidirectionalOnes[17], DateTime.Parse("2005-03-21 14:45:37")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[13], _unidirectionalOnes[8], DateTime.Parse("2016-06-26 08:03:32")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[14], _unidirectionalOnes[12], DateTime.Parse("2018-09-18 12:51:22")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[15], _unidirectionalOnes[4], DateTime.Parse("2016-12-17 14:20:25")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[15], _unidirectionalOnes[5], DateTime.Parse("2008-07-30 03:43:17")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[16], _unidirectionalOnes[13], DateTime.Parse("2019-08-01 16:26:31")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[18], _unidirectionalOnes[0], DateTime.Parse("2010-02-19 13:24:07")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[18], _unidirectionalOnes[7], DateTime.Parse("2004-07-28 09:06:02")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[18], _unidirectionalOnes[11], DateTime.Parse("2004-08-21 11:07:20")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[19], _unidirectionalOnes[0], DateTime.Parse("2014-11-21 18:13:02")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[19], _unidirectionalOnes[6], DateTime.Parse("2009-08-24 21:44:46")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[19], _unidirectionalOnes[13], DateTime.Parse("2013-02-18 02:19:19")), - CreateUnidirectionalJoinOneSelfPayload(context, _unidirectionalOnes[19], _unidirectionalOnes[15], DateTime.Parse("2016-02-05 14:18:12")) + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[2], _unidirectionalOnes[3], DateTime.Parse("2020-01-11 19:26:36")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[2], _unidirectionalOnes[5], DateTime.Parse("2005-10-03 12:57:54")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[2], _unidirectionalOnes[7], DateTime.Parse("2015-12-20 01:09:24")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[2], _unidirectionalOnes[17], DateTime.Parse("1999-12-26 02:51:57")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[2], _unidirectionalOnes[19], DateTime.Parse("2011-06-15 19:08:00")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[4], _unidirectionalOnes[2], DateTime.Parse("2019-12-08 05:40:16")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[4], _unidirectionalOnes[3], DateTime.Parse("2014-03-09 12:58:26")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[5], _unidirectionalOnes[4], DateTime.Parse("2014-05-15 16:34:38")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[5], _unidirectionalOnes[6], DateTime.Parse("2014-03-08 18:59:49")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[5], _unidirectionalOnes[12], DateTime.Parse("2013-12-10 07:01:53")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[6], _unidirectionalOnes[12], DateTime.Parse("2005-05-31 02:21:16")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[7], _unidirectionalOnes[8], DateTime.Parse("2011-12-31 19:37:25")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[7], _unidirectionalOnes[10], DateTime.Parse("2012-08-02 16:33:07")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[7], _unidirectionalOnes[11], DateTime.Parse("2018-07-19 09:10:12")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[9], _unidirectionalOnes[6], DateTime.Parse("2018-12-28 01:21:23")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[12], _unidirectionalOnes[1], DateTime.Parse("2014-03-22 02:20:06")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[12], _unidirectionalOnes[17], DateTime.Parse("2005-03-21 14:45:37")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[13], _unidirectionalOnes[8], DateTime.Parse("2016-06-26 08:03:32")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[14], _unidirectionalOnes[12], DateTime.Parse("2018-09-18 12:51:22")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[15], _unidirectionalOnes[4], DateTime.Parse("2016-12-17 14:20:25")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[15], _unidirectionalOnes[5], DateTime.Parse("2008-07-30 03:43:17")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[16], _unidirectionalOnes[13], DateTime.Parse("2019-08-01 16:26:31")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[18], _unidirectionalOnes[0], DateTime.Parse("2010-02-19 13:24:07")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[18], _unidirectionalOnes[7], DateTime.Parse("2004-07-28 09:06:02")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[18], _unidirectionalOnes[11], DateTime.Parse("2004-08-21 11:07:20")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[19], _unidirectionalOnes[0], DateTime.Parse("2014-11-21 18:13:02")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[19], _unidirectionalOnes[6], DateTime.Parse("2009-08-24 21:44:46")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[19], _unidirectionalOnes[13], DateTime.Parse("2013-02-18 02:19:19")), + CreateUnidirectionalJoinOneSelfPayload( + context, _unidirectionalOnes[19], _unidirectionalOnes[15], DateTime.Parse("2016-02-05 14:18:12")) }; private static UnidirectionalJoinOneSelfPayload CreateUnidirectionalJoinOneSelfPayload( @@ -1688,13 +1767,16 @@ private UnidirectionalJoinOneToThreePayloadFull[] CreateUnidirectionalJoinOneToT CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[0], _unidirectionalThrees[8], "Freda Vaughn"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[0], _unidirectionalThrees[12], "Pedro Mccarthy"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[0], _unidirectionalThrees[16], "Elaine Simon"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[1], _unidirectionalThrees[8], "Melvin Maldonado"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[1], _unidirectionalThrees[8], "Melvin Maldonado"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[1], _unidirectionalThrees[10], "Lora George"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[1], _unidirectionalThrees[12], "Joey Cohen"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[1], _unidirectionalThrees[13], "Erik Carroll"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[1], _unidirectionalThrees[15], "April Rodriguez"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[1], _unidirectionalThrees[15], "April Rodriguez"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[2], _unidirectionalThrees[4], "Gerardo Colon"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[2], _unidirectionalThrees[11], "Alexander Willis"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[2], _unidirectionalThrees[11], "Alexander Willis"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[2], _unidirectionalThrees[15], "Laura Wheeler"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[2], _unidirectionalThrees[18], "Lester Summers"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[3], _unidirectionalThrees[1], "Raquel Curry"), @@ -1703,14 +1785,17 @@ private UnidirectionalJoinOneToThreePayloadFull[] CreateUnidirectionalJoinOneToT CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[3], _unidirectionalThrees[12], "Lauren Clayton"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[3], _unidirectionalThrees[18], "Maureen Weber"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[4], _unidirectionalThrees[3], "Joyce Ford"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[4], _unidirectionalThrees[5], "Willie Mccormick"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[4], _unidirectionalThrees[8], "Geraldine Jackson"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[4], _unidirectionalThrees[5], "Willie Mccormick"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[4], _unidirectionalThrees[8], "Geraldine Jackson"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[6], _unidirectionalThrees[0], "Victor Aguilar"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[6], _unidirectionalThrees[3], "Cathy Allen"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[6], _unidirectionalThrees[8], "Edwin Burke"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[6], _unidirectionalThrees[9], "Eugene Flores"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[6], _unidirectionalThrees[10], "Ginger Patton"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[6], _unidirectionalThrees[11], "Israel Mitchell"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[6], _unidirectionalThrees[11], "Israel Mitchell"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[6], _unidirectionalThrees[17], "Joy Francis"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[7], _unidirectionalThrees[0], "Orville Parker"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[7], _unidirectionalThrees[2], "Alyssa Mann"), @@ -1718,7 +1803,8 @@ private UnidirectionalJoinOneToThreePayloadFull[] CreateUnidirectionalJoinOneToT CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[7], _unidirectionalThrees[12], "Kim Craig"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[7], _unidirectionalThrees[13], "Lucille Moreno"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[7], _unidirectionalThrees[16], "Virgil Drake"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[7], _unidirectionalThrees[17], "Josephine Dawson"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[7], _unidirectionalThrees[17], "Josephine Dawson"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[7], _unidirectionalThrees[19], "Milton Huff"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[8], _unidirectionalThrees[1], "Jody Clarke"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[8], _unidirectionalThrees[8], "Elisa Cooper"), @@ -1731,44 +1817,60 @@ private UnidirectionalJoinOneToThreePayloadFull[] CreateUnidirectionalJoinOneToT CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[3], "Shari Jensen"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[7], "Ricky Bradley"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[9], "Debra Gibbs"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[10], "Everett Mckenzie"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[9], _unidirectionalThrees[10], "Everett Mckenzie"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[13], "Kirk Graham"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[15], "Paulette Adkins"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[9], _unidirectionalThrees[15], "Paulette Adkins"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[17], "Raul Holloway"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[9], _unidirectionalThrees[18], "Danielle Ross"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[0], "Frank Garner"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[5], "Stella Thompson"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[10], _unidirectionalThrees[5], "Stella Thompson"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[7], "Peggy Wagner"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[8], "Geneva Holmes"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[9], "Ignacio Black"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[12], "Phillip Wells"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[13], "Hubert Lambert"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[10], _unidirectionalThrees[18], "Courtney Gregory"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[10], _unidirectionalThrees[13], "Hubert Lambert"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[10], _unidirectionalThrees[18], "Courtney Gregory"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[11], _unidirectionalThrees[1], "Esther Carter"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[5], "Thomas Benson"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[8], "Kara Baldwin"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[9], "Yvonne Sparks"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[10], "Darin Mathis"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[11], "Glenda Castillo"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[12], _unidirectionalThrees[11], "Glenda Castillo"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[12], "Larry Walters"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[14], "Meredith Yates"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[15], "Rosemarie Henry"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[12], _unidirectionalThrees[14], "Meredith Yates"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[12], _unidirectionalThrees[15], "Rosemarie Henry"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[12], _unidirectionalThrees[17], "Nora Leonard"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[13], _unidirectionalThrees[16], "Corey Delgado"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[13], _unidirectionalThrees[17], "Kari Strickland"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[13], _unidirectionalThrees[17], "Kari Strickland"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[14], _unidirectionalThrees[7], "Joann Stanley"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[14], _unidirectionalThrees[10], "Camille Gordon"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[14], _unidirectionalThrees[13], "Flora Anderson"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[14], _unidirectionalThrees[10], "Camille Gordon"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[14], _unidirectionalThrees[13], "Flora Anderson"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[14], _unidirectionalThrees[14], "Wilbur Soto"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[14], _unidirectionalThrees[17], "Shirley Andrews"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[14], _unidirectionalThrees[19], "Marcus Mcguire"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[14], _unidirectionalThrees[17], "Shirley Andrews"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[14], _unidirectionalThrees[19], "Marcus Mcguire"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[15], _unidirectionalThrees[0], "Saul Dixon"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[15], _unidirectionalThrees[5], "Cynthia Hart"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[15], _unidirectionalThrees[9], "Elbert Spencer"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[15], _unidirectionalThrees[12], "Darrell Norris"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[15], _unidirectionalThrees[12], "Darrell Norris"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[15], _unidirectionalThrees[13], "Jamie Kelley"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[15], _unidirectionalThrees[14], "Francis Briggs"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[15], _unidirectionalThrees[15], "Lindsey Morris"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[15], _unidirectionalThrees[14], "Francis Briggs"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[15], _unidirectionalThrees[15], "Lindsey Morris"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[16], _unidirectionalThrees[1], "James Castro"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[16], _unidirectionalThrees[4], "Carlos Chavez"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[16], _unidirectionalThrees[6], "Janis Valdez"), @@ -1781,21 +1883,25 @@ private UnidirectionalJoinOneToThreePayloadFull[] CreateUnidirectionalJoinOneToT CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[17], _unidirectionalThrees[17], "Albert Harper"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[1], "Frankie Baker"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[4], "Candace Tucker"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[5], "Willis Christensen"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[18], _unidirectionalThrees[5], "Willis Christensen"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[6], "Juan Joseph"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[9], "Thelma Sanders"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[10], "Kerry West"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[14], "Sheri Castro"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[15], "Mark Schultz"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[16], "Priscilla Summers"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[18], _unidirectionalThrees[16], "Priscilla Summers"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[18], _unidirectionalThrees[19], "Allan Valdez"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[2], "Bill Peters"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[4], "Cora Stone"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[5], "Frankie Pope"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[9], "Christian Young"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[19], _unidirectionalThrees[9], "Christian Young"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[10], "Shari Brewer"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[11], "Antonia Wolfe"), - CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[13], "Lawrence Matthews"), + CreateUnidirectionalJoinOneToThreePayloadFull( + context, _unidirectionalOnes[19], _unidirectionalThrees[13], "Lawrence Matthews"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[17], "Van Hubbard"), CreateUnidirectionalJoinOneToThreePayloadFull(context, _unidirectionalOnes[19], _unidirectionalThrees[19], "Lindsay Pena") }; @@ -2135,45 +2241,74 @@ private Dictionary[] CreateUnidirectionalJoinOneToThreePayloadFu => new[] { CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[2], _unidirectionalThrees[0], "Capbrough"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[2], _unidirectionalThrees[1], "East Eastdol"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[2], _unidirectionalThrees[3], "Southingville"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[2], _unidirectionalThrees[8], "Goldbrough"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[3], _unidirectionalThrees[4], "Readingworth"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[3], _unidirectionalThrees[17], "Skillpool"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[2], _unidirectionalThrees[1], "East Eastdol"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[2], _unidirectionalThrees[3], "Southingville"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[2], _unidirectionalThrees[8], "Goldbrough"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[3], _unidirectionalThrees[4], "Readingworth"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[3], _unidirectionalThrees[17], "Skillpool"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[4], _unidirectionalThrees[0], "Lawgrad"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[4], _unidirectionalThrees[3], "Kettleham Park"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[4], _unidirectionalThrees[8], "Sayford Park"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[4], _unidirectionalThrees[3], "Kettleham Park"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[4], _unidirectionalThrees[8], "Sayford Park"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[4], _unidirectionalThrees[15], "Hamstead"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[5], _unidirectionalThrees[10], "North Starside"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[5], _unidirectionalThrees[10], "North Starside"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[5], _unidirectionalThrees[12], "Goldfolk"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[6], _unidirectionalThrees[3], "Winstead"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[7], _unidirectionalThrees[10], "Transworth"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[7], _unidirectionalThrees[10], "Transworth"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[7], _unidirectionalThrees[17], "Parkpool"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[7], _unidirectionalThrees[18], "Fishham"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[9], _unidirectionalThrees[0], "Passmouth"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[9], _unidirectionalThrees[4], "Valenfield"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[9], _unidirectionalThrees[19], "Passford Park"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[10], _unidirectionalThrees[9], "Chatfield"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[9], _unidirectionalThrees[4], "Valenfield"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[9], _unidirectionalThrees[19], "Passford Park"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[10], _unidirectionalThrees[9], "Chatfield"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[11], _unidirectionalThrees[10], "Hosview"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[11], _unidirectionalThrees[16], "Dodgewich"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[12], _unidirectionalThrees[2], "Skillhampton"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[12], _unidirectionalThrees[13], "Hardcaster"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[12], _unidirectionalThrees[15], "Hollowmouth"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[13], _unidirectionalThrees[5], "Cruxcaster"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[13], _unidirectionalThrees[10], "Elcaster"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[13], _unidirectionalThrees[16], "Clambrough"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[11], _unidirectionalThrees[16], "Dodgewich"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[12], _unidirectionalThrees[2], "Skillhampton"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[12], _unidirectionalThrees[13], "Hardcaster"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[12], _unidirectionalThrees[15], "Hollowmouth"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[13], _unidirectionalThrees[5], "Cruxcaster"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[13], _unidirectionalThrees[10], "Elcaster"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[13], _unidirectionalThrees[16], "Clambrough"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[14], _unidirectionalThrees[9], "Millwich"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[14], _unidirectionalThrees[12], "Hapcester"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[15], _unidirectionalThrees[6], "Sanddol Beach"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[15], _unidirectionalThrees[12], "Hamcaster"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[16], _unidirectionalThrees[8], "New Foxbrough"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[16], _unidirectionalThrees[12], "Chatpool"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[17], _unidirectionalThrees[7], "Duckworth"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[14], _unidirectionalThrees[12], "Hapcester"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[15], _unidirectionalThrees[6], "Sanddol Beach"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[15], _unidirectionalThrees[12], "Hamcaster"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[16], _unidirectionalThrees[8], "New Foxbrough"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[16], _unidirectionalThrees[12], "Chatpool"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[17], _unidirectionalThrees[7], "Duckworth"), CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[17], _unidirectionalThrees[11], "Snowham"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[17], _unidirectionalThrees[12], "Bannview Island"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[19], _unidirectionalThrees[3], "Rockbrough"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[19], _unidirectionalThrees[4], "Sweetfield"), - CreateUnidirectionalJoinOneToThreePayloadFullShared(context, _unidirectionalOnes[19], _unidirectionalThrees[15], "Bayburgh Hills") + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[17], _unidirectionalThrees[12], "Bannview Island"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[19], _unidirectionalThrees[3], "Rockbrough"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[19], _unidirectionalThrees[4], "Sweetfield"), + CreateUnidirectionalJoinOneToThreePayloadFullShared( + context, _unidirectionalOnes[19], _unidirectionalThrees[15], "Bayburgh Hills") }; private static Dictionary CreateUnidirectionalJoinOneToThreePayloadFullShared( @@ -2338,7 +2473,6 @@ private static Dictionary CreateUnidirectionalEntityRootEntityTh e["UnidirectionalEntityRootId"] = context?.Entry(root).Property(e => e.Id).CurrentValue ?? root.Id; }); - private Dictionary[] CreateUnidirectionalEntityRootUnidirectionalEntityBranches(ManyToManyContext context) { var branches = _unidirectionalRoots.OfType().ToList(); diff --git a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityOne.cs b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityOne.cs index 7ca25e127f0..6e39fe5e379 100644 --- a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityOne.cs +++ b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityOne.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel.DataAnnotations.Schema; - namespace Microsoft.EntityFrameworkCore.TestModels.ManyToManyModel; public class UnidirectionalEntityOne diff --git a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityThree.cs b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityThree.cs index 80395714a69..3f5ab3a3a31 100644 --- a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityThree.cs +++ b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityThree.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel.DataAnnotations.Schema; - namespace Microsoft.EntityFrameworkCore.TestModels.ManyToManyModel; public class UnidirectionalEntityThree diff --git a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityTwo.cs b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityTwo.cs index f1261ff39bb..3a056537a60 100644 --- a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityTwo.cs +++ b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalEntityTwo.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel.DataAnnotations.Schema; - namespace Microsoft.EntityFrameworkCore.TestModels.ManyToManyModel; public class UnidirectionalEntityTwo diff --git a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysLeft.cs b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysLeft.cs index 00b06f70411..3b24f153751 100644 --- a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysLeft.cs +++ b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysLeft.cs @@ -10,5 +10,6 @@ public class UnidirectionalGeneratedKeysLeft public virtual int Id { get; set; } public virtual string Name { get; set; } - public virtual ICollection Rights { get; } = new ObservableCollection(); + public virtual ICollection Rights { get; } = + new ObservableCollection(); } diff --git a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysRight.cs b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysRight.cs index 5447624ba5c..41097e5ef92 100644 --- a/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysRight.cs +++ b/test/EFCore.Specification.Tests/TestModels/ManyToManyModel/UnidirectionalGeneratedKeysRight.cs @@ -10,5 +10,6 @@ public class UnidirectionalGeneratedKeysRight public virtual int Id { get; set; } public virtual string Name { get; set; } - public virtual ICollection Lefts { get; } = new ObservableCollection(); + public virtual ICollection Lefts { get; } = + new ObservableCollection(); } diff --git a/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindContext.cs b/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindContext.cs index d1fa6c8f99d..8fb357ea4c3 100644 --- a/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindContext.cs +++ b/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindContext.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable StringStartsWithIsCultureSpecific namespace Microsoft.EntityFrameworkCore.TestModels.Northwind; diff --git a/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindData.cs b/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindData.cs index 4a795f71a7e..c26733e07e1 100644 --- a/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindData.cs +++ b/test/EFCore.Specification.Tests/TestModels/Northwind/NorthwindData.cs @@ -18,7 +18,7 @@ public partial class NorthwindData : ISetSource public OrderQuery[] OrderQueries { get; } public OrderDetail[] OrderDetails { get; } - private readonly Dictionary _categoryNameMap = new Dictionary + private readonly Dictionary _categoryNameMap = new() { { 1, "Beverages" }, { 2, "Condiments" }, @@ -74,12 +74,13 @@ public NorthwindData() ProductName = product.ProductName }); - productViews.Add(new ProductView - { - CategoryName = _categoryNameMap[product.CategoryID.Value], - ProductID = product.ProductID, - ProductName = product.ProductName - }); + productViews.Add( + new ProductView + { + CategoryName = _categoryNameMap[product.CategoryID.Value], + ProductID = product.ProductID, + ProductName = product.ProductName + }); } } diff --git a/test/EFCore.Specification.Tests/TestModels/QueryFilterFuncletizationContext.cs b/test/EFCore.Specification.Tests/TestModels/QueryFilterFuncletizationContext.cs index 5a7af101ce1..ab34f7c4349 100644 --- a/test/EFCore.Specification.Tests/TestModels/QueryFilterFuncletizationContext.cs +++ b/test/EFCore.Specification.Tests/TestModels/QueryFilterFuncletizationContext.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable once CheckNamespace + namespace Microsoft.EntityFrameworkCore.Query; public class QueryFilterFuncletizationContext : DbContext diff --git a/test/EFCore.Specification.Tests/TestModels/UpdatesModel/LoginDetails.cs b/test/EFCore.Specification.Tests/TestModels/UpdatesModel/LoginDetails.cs index 36bbc332c26..6c6203c15b0 100644 --- a/test/EFCore.Specification.Tests/TestModels/UpdatesModel/LoginDetails.cs +++ b/test/EFCore.Specification.Tests/TestModels/UpdatesModel/LoginDetails.cs @@ -39,6 +39,7 @@ public string? } public virtual - LoginEntityTypeWithAnExtremelyLongAndOverlyConvolutedNameThatIsUsedToVerifyThatTheStoreIdentifierGenerationLengthLimitIsWorkingCorrectly? + LoginEntityTypeWithAnExtremelyLongAndOverlyConvolutedNameThatIsUsedToVerifyThatTheStoreIdentifierGenerationLengthLimitIsWorkingCorrectly + ? Login { get; set; } } diff --git a/test/EFCore.Specification.Tests/TestModels/UpdatesModel/Profile.cs b/test/EFCore.Specification.Tests/TestModels/UpdatesModel/Profile.cs index ac750fe8e34..86968db42a0 100644 --- a/test/EFCore.Specification.Tests/TestModels/UpdatesModel/Profile.cs +++ b/test/EFCore.Specification.Tests/TestModels/UpdatesModel/Profile.cs @@ -24,6 +24,7 @@ public class Profile public long? Id14 { get; set; } public virtual - LoginEntityTypeWithAnExtremelyLongAndOverlyConvolutedNameThatIsUsedToVerifyThatTheStoreIdentifierGenerationLengthLimitIsWorkingCorrectly? + LoginEntityTypeWithAnExtremelyLongAndOverlyConvolutedNameThatIsUsedToVerifyThatTheStoreIdentifierGenerationLengthLimitIsWorkingCorrectly + ? User { get; set; } } diff --git a/test/EFCore.Specification.Tests/UnidirectionalManyToManyLoadTestBase.cs b/test/EFCore.Specification.Tests/UnidirectionalManyToManyLoadTestBase.cs index 1f43bd2071b..0dd7db55055 100644 --- a/test/EFCore.Specification.Tests/UnidirectionalManyToManyLoadTestBase.cs +++ b/test/EFCore.Specification.Tests/UnidirectionalManyToManyLoadTestBase.cs @@ -499,7 +499,10 @@ public virtual async Task Load_collection_using_Query_not_found_untyped_unidirec [InlineData(EntityState.Modified, false, CascadeTiming.OnSaveChanges)] [InlineData(EntityState.Deleted, true, CascadeTiming.OnSaveChanges)] [InlineData(EntityState.Deleted, false, CascadeTiming.OnSaveChanges)] - public virtual async Task Load_collection_already_loaded_untyped_unidirectional(EntityState state, bool async, CascadeTiming deleteOrphansTiming) + public virtual async Task Load_collection_already_loaded_untyped_unidirectional( + EntityState state, + bool async, + CascadeTiming deleteOrphansTiming) { using var context = Fixture.CreateContext(); @@ -543,8 +546,9 @@ public virtual async Task Load_collection_already_loaded_untyped_unidirectional( Assert.Equal(4, navigationEntry.CurrentValue!.Count()); foreach (var right in navigationEntry.CurrentValue!) { - Assert.Contains(left, context.Entry((object)right).Collection("UnidirectionalEntityOne") - .CurrentValue!.Cast()); + Assert.Contains( + left, context.Entry((object)right).Collection("UnidirectionalEntityOne") + .CurrentValue!.Cast()); } Assert.Equal(1 + 4 + 4, context.ChangeTracker.Entries().Count()); @@ -860,11 +864,13 @@ public virtual async Task Load_collection_using_Query_with_filtered_Include_unid var children = async ? await collectionEntry.Query() - .Include(e => EF.Property>(e, "UnidirectionalEntityThree") - .Where(e => e.Id == 13 || e.Id == 11)).ToListAsync() + .Include( + e => EF.Property>(e, "UnidirectionalEntityThree") + .Where(e => e.Id == 13 || e.Id == 11)).ToListAsync() : collectionEntry.Query() - .Include(e => EF.Property>(e, "UnidirectionalEntityThree") - .Where(e => e.Id == 13 || e.Id == 11)).ToList(); + .Include( + e => EF.Property>(e, "UnidirectionalEntityThree") + .Where(e => e.Id == 13 || e.Id == 11)).ToList(); Assert.False(collectionEntry.IsLoaded); foreach (var entityTwo in left.TwoSkipShared) diff --git a/test/EFCore.Specification.Tests/UnidirectionalManyToManyTrackingTestBase.cs b/test/EFCore.Specification.Tests/UnidirectionalManyToManyTrackingTestBase.cs index 8584432325e..2357bdc0833 100644 --- a/test/EFCore.Specification.Tests/UnidirectionalManyToManyTrackingTestBase.cs +++ b/test/EFCore.Specification.Tests/UnidirectionalManyToManyTrackingTestBase.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.ObjectModel; -using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.TestModels.ManyToManyModel; namespace Microsoft.EntityFrameworkCore; @@ -89,7 +88,8 @@ await ExecuteWithStrategyInTransactionAsync( async context => { var queryable = context.Set().Where(e => leftKeys.Contains(e.Key1)); - context.Set().Where(e => leftKeys.Contains(e.CompositeId1)).Include(e => e.Leaf).Load(); + context.Set().Where(e => leftKeys.Contains(e.CompositeId1)).Include(e => e.Leaf) + .Load(); var results = async ? await queryable.ToListAsync() : queryable.ToList(); Assert.Equal(3, results.Count); @@ -589,7 +589,8 @@ public virtual void Can_update_many_to_many_composite_additional_pk_with_navs_un { var leftEntities = context.Set().Include(e => e.ThreeSkipFull).OrderBy(e => e.Key2) .ToList(); - var rightEntities = context.Set().Include("UnidirectionalEntityCompositeKey").OrderBy(e => e.Name).ToList(); + var rightEntities = context.Set().Include("UnidirectionalEntityCompositeKey") + .OrderBy(e => e.Name).ToList(); var threes = new[] { @@ -693,7 +694,8 @@ public virtual void Can_update_many_to_many_composite_additional_pk_with_navs_un { var leftEntities = context.Set().Include(e => e.ThreeSkipFull).OrderBy(e => e.Key2) .ToList(); - var rightEntities = context.Set().Include("UnidirectionalEntityCompositeKey").OrderBy(e => e.Name) + var rightEntities = context.Set().Include("UnidirectionalEntityCompositeKey") + .OrderBy(e => e.Name) .ToList(); ValidateFixup(context, leftEntities, rightEntities, 24, 24, 53 - 4); @@ -796,7 +798,8 @@ public virtual void Can_delete_with_many_to_many_composite_additional_pk_with_na context => { var ones = context.Set().Include(e => e.ThreeSkipFull).OrderBy(e => e.Key2).ToList(); - var threes = context.Set().Include("UnidirectionalEntityCompositeKey").OrderBy(e => e.Name).ToList(); + var threes = context.Set().Include("UnidirectionalEntityCompositeKey").OrderBy(e => e.Name) + .ToList(); // Make sure other related entities are loaded for delete fixup context.Set().Load(); @@ -862,7 +865,8 @@ public virtual void Can_delete_with_many_to_many_composite_additional_pk_with_na context => { var ones = context.Set().Include(e => e.ThreeSkipFull).OrderBy(e => e.Key2).ToList(); - var threes = context.Set().Include("UnidirectionalEntityCompositeKey").OrderBy(e => e.Name).ToList(); + var threes = context.Set().Include("UnidirectionalEntityCompositeKey").OrderBy(e => e.Name) + .ToList(); ValidateNavigations(context, ones, threes); @@ -1317,7 +1321,8 @@ public virtual void Can_update_many_to_many_with_inheritance_unidirectional() context => { var leftEntities = context.Set().Include(e => e.BranchSkip).OrderBy(e => e.Name).ToList(); - var rightEntities = context.Set().Include("UnidirectionalEntityOne").OrderBy(e => e.Name).ToList(); + var rightEntities = context.Set().Include("UnidirectionalEntityOne").OrderBy(e => e.Name) + .ToList(); leftEntities[0].BranchSkip.Add( context.Set().CreateInstance( @@ -1405,7 +1410,8 @@ public virtual void Can_update_many_to_many_with_inheritance_unidirectional() context => { var leftEntities = context.Set().Include(e => e.BranchSkip).OrderBy(e => e.Name).ToList(); - var rightEntities = context.Set().Include("UnidirectionalEntityOne").OrderBy(e => e.Name).ToList(); + var rightEntities = context.Set().Include("UnidirectionalEntityOne").OrderBy(e => e.Name) + .ToList(); ValidateFixup(context, leftEntities, rightEntities, 24, 14, 55 - 4); }); @@ -1572,7 +1578,6 @@ void ValidateFixup( Assert.Single(leftEntities[1].SelfSkipPayloadLeft); Assert.Single(leftEntities[2].SelfSkipPayloadLeft); - Assert.Equal( 3, context.Entry(rightEntities[0]).Collection("UnidirectionalEntityOne").CurrentValue!.Count()); Assert.Single(context.Entry(rightEntities[1]).Collection("UnidirectionalEntityOne").CurrentValue!); @@ -1668,7 +1673,7 @@ public virtual void Can_update_many_to_many_self_with_payload_unidirectional() }; var leftNav0 = (ICollection)context.Entry(leftEntities[0]) - .Collection("UnidirectionalEntityOne").CurrentValue!; + .Collection("UnidirectionalEntityOne").CurrentValue!; leftNav0.Add(ones[0]); leftNav0.Add(ones[1]); leftNav0.Add(ones[2]); @@ -2006,12 +2011,12 @@ public virtual void Can_update_many_to_many_shared_with_payload_unidirectional() .Collection("UnidirectionalEntityOne1").CurrentValue!; rightNav2.Remove(rightNav2.Single(e => e.Name == "EntityOne 12")); rightNav2.Add( - context.UnidirectionalEntityOnes.CreateInstance( - (e, p) => - { - e.Id = Fixture.UseGeneratedKeys ? 0 : 7714; - e.Name = "Z7714"; - })); + context.UnidirectionalEntityOnes.CreateInstance( + (e, p) => + { + e.Id = Fixture.UseGeneratedKeys ? 0 : 7714; + e.Name = "Z7714"; + })); if (RequiresDetectChanges) { @@ -2709,7 +2714,8 @@ void ValidateFixup(DbContext context, IList leftEntitie Assert.Single(leftEntities[1].TwoSkip); Assert.Single(leftEntities[2].TwoSkip); - Assert.Equal(3, + Assert.Equal( + 3, ((IEnumerable)context.Entry(rightEntities[0]).Collection("UnidirectionalEntityOne1").CurrentValue!).Count()); Assert.Single((IEnumerable)context.Entry(rightEntities[1]).Collection("UnidirectionalEntityOne1").CurrentValue!); Assert.Single((IEnumerable)context.Entry(rightEntities[2]).Collection("UnidirectionalEntityOne1").CurrentValue!); diff --git a/test/EFCore.Specification.Tests/UpdatesTestBase.cs b/test/EFCore.Specification.Tests/UpdatesTestBase.cs index 7d3d14d07c7..6e8de2f4fde 100644 --- a/test/EFCore.Specification.Tests/UpdatesTestBase.cs +++ b/test/EFCore.Specification.Tests/UpdatesTestBase.cs @@ -19,11 +19,7 @@ protected UpdatesTestBase(TFixture fixture) protected TFixture Fixture { get; } - public static IEnumerable IsAsyncData = new[] - { - new object[] { true }, - new object[] { false } - }; + public static IEnumerable IsAsyncData = new[] { new object[] { true }, new object[] { false } }; [ConditionalTheory] // Issue #25905 [InlineData(false)] @@ -61,7 +57,6 @@ public virtual async Task Can_delete_and_add_for_same_key(bool async) Assert.Equal(1, context.ChangeTracker.Entries().Count()); Assert.Equal(EntityState.Unchanged, context.Entry(rodney2).State); Assert.Equal(EntityState.Detached, context.Entry(rodney1).State); - }); [ConditionalFact] diff --git a/test/EFCore.Specification.Tests/ValueConvertersEndToEndTestBase.cs b/test/EFCore.Specification.Tests/ValueConvertersEndToEndTestBase.cs index 8a944aed994..dad4e9014da 100644 --- a/test/EFCore.Specification.Tests/ValueConvertersEndToEndTestBase.cs +++ b/test/EFCore.Specification.Tests/ValueConvertersEndToEndTestBase.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + using System.Net; using System.Net.NetworkInformation; using System.Text.Json; -#nullable enable - // ReSharper disable StaticMemberInGenericType namespace Microsoft.EntityFrameworkCore; diff --git a/test/EFCore.SqlServer.FunctionalTests/BuiltInDataTypesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BuiltInDataTypesSqlServerTest.cs index e6e7827e39c..6d0f8e97c6a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BuiltInDataTypesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BuiltInDataTypesSqlServerTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel.DataAnnotations.Schema; +using System.Globalization; // ReSharper disable InconsistentNaming // ReSharper disable ParameterOnlyUsedForPreconditionCheck.Local @@ -1654,7 +1655,7 @@ private static void AssertMappedScaledDataTypes(MappedScaledDataTypes entity, in Assert.Equal( new DateTimeOffset(new DateTime(2016, 1, 2, 11, 11, 12, 765), TimeSpan.Zero), entity.DateTimeOffsetAsDatetimeoffset3); Assert.Equal(new DateTime(2017, 1, 2, 12, 11, 12, 321), entity.DateTimeAsDatetime23); - Assert.Equal(TimeSpan.Parse("12:34:56.789", System.Globalization.CultureInfo.InvariantCulture), entity.TimeSpanAsTime3); + Assert.Equal(TimeSpan.Parse("12:34:56.789", CultureInfo.InvariantCulture), entity.TimeSpanAsTime3); Assert.Equal(101m, entity.DecimalAsDecimal3); Assert.Equal(102m, entity.DecimalAsDec3); Assert.Equal(103m, entity.DecimalAsNumeric3); @@ -1673,7 +1674,7 @@ private static MappedScaledDataTypes CreateMappedScaledDataTypes(int id) DecimalAsDecimal3 = 101m, DecimalAsDec3 = 102m, DecimalAsNumeric3 = 103m, - TimeSpanAsTime3 = TimeSpan.Parse("12:34:56.7890123", System.Globalization.CultureInfo.InvariantCulture) + TimeSpanAsTime3 = TimeSpan.Parse("12:34:56.7890123", CultureInfo.InvariantCulture) }; [ConditionalFact] @@ -1721,7 +1722,7 @@ private static void AssertMappedScaledSeparatelyDataTypes(MappedScaledSeparately Assert.Equal(101m, entity.DecimalAsDecimal3); Assert.Equal(102m, entity.DecimalAsDec3); Assert.Equal(103m, entity.DecimalAsNumeric3); - Assert.Equal(TimeSpan.Parse("12:34:56.789", System.Globalization.CultureInfo.InvariantCulture), entity.TimeSpanAsTime3); + Assert.Equal(TimeSpan.Parse("12:34:56.789", CultureInfo.InvariantCulture), entity.TimeSpanAsTime3); } private static MappedScaledSeparatelyDataTypes CreateMappedScaledSeparatelyDataTypes(int id) @@ -1737,7 +1738,7 @@ private static MappedScaledSeparatelyDataTypes CreateMappedScaledSeparatelyDataT DecimalAsDecimal3 = 101m, DecimalAsDec3 = 102m, DecimalAsNumeric3 = 103m, - TimeSpanAsTime3 = TimeSpan.Parse("12:34:56.789", System.Globalization.CultureInfo.InvariantCulture) + TimeSpanAsTime3 = TimeSpan.Parse("12:34:56.789", CultureInfo.InvariantCulture) }; [ConditionalFact] @@ -2615,7 +2616,7 @@ private static void AssertMappedScaledDataTypesWithIdentity(MappedScaledDataType Assert.Equal(101m, entity.DecimalAsDecimal3); Assert.Equal(102m, entity.DecimalAsDec3); Assert.Equal(103m, entity.DecimalAsNumeric3); - Assert.Equal(TimeSpan.Parse("12:34:56.789", System.Globalization.CultureInfo.InvariantCulture), entity.TimeSpanAsTime3); + Assert.Equal(TimeSpan.Parse("12:34:56.789", CultureInfo.InvariantCulture), entity.TimeSpanAsTime3); } private static MappedScaledDataTypesWithIdentity CreateMappedScaledDataTypesWithIdentity(int id) @@ -2631,7 +2632,7 @@ private static MappedScaledDataTypesWithIdentity CreateMappedScaledDataTypesWith DecimalAsDecimal3 = 101m, DecimalAsDec3 = 102m, DecimalAsNumeric3 = 103m, - TimeSpanAsTime3 = TimeSpan.Parse("12:34:56.7890123", System.Globalization.CultureInfo.InvariantCulture) + TimeSpanAsTime3 = TimeSpan.Parse("12:34:56.7890123", CultureInfo.InvariantCulture) }; [ConditionalFact] diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerFixture.cs index f0022d03b97..b70f9c6e976 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerFixture.cs @@ -5,7 +5,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class FiltersInheritanceBulkUpdatesSqlServerFixture : InheritanceBulkUpdatesSqlServerFixture { - protected override string StoreName => "FiltersInheritanceBulkUpdatesTest"; + protected override string StoreName + => "FiltersInheritanceBulkUpdatesTest"; protected override bool EnableFilters => true; diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerTest.cs index 4bc21c44f07..92a3c8afd85 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqlServerTest.cs @@ -3,7 +3,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; -public class FiltersInheritanceBulkUpdatesSqlServerTest : FiltersInheritanceBulkUpdatesTestBase +public class FiltersInheritanceBulkUpdatesSqlServerTest : FiltersInheritanceBulkUpdatesTestBase< + FiltersInheritanceBulkUpdatesSqlServerFixture> { public FiltersInheritanceBulkUpdatesSqlServerTest(FiltersInheritanceBulkUpdatesSqlServerFixture fixture) : base(fixture) @@ -186,7 +187,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqlServerTest.cs index b84354e1359..8a4b84e8971 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqlServerTest.cs @@ -185,7 +185,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqlServerTest.cs index 160ccc428ac..3115a242fdd 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqlServerTest.cs @@ -5,7 +5,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class NonSharedModelBulkUpdatesSqlServerTest : NonSharedModelBulkUpdatesTestBase { - protected override ITestStoreFactory TestStoreFactory => SqlServerTestStoreFactory.Instance; + protected override ITestStoreFactory TestStoreFactory + => SqlServerTestStoreFactory.Instance; [ConditionalFact] public virtual void Check_all_tests_overridden() diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerFixture.cs index 351f3caaa5b..b7da86b28ec 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerFixture.cs @@ -6,7 +6,7 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class NorthwindBulkUpdatesSqlServerFixture : NorthwindBulkUpdatesFixture - where TModelCustomizer: IModelCustomizer, new() + where TModelCustomizer : IModelCustomizer, new() { protected override ITestStoreFactory TestStoreFactory => SqlServerNorthwindTestStoreFactory.Instance; diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs index a055ddaa26e..503e5eaf819 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs @@ -46,8 +46,8 @@ public override async Task Delete_Where_parameter(bool async) DELETE FROM [o] FROM [Order Details] AS [o] WHERE [o].[Quantity] = @__quantity_0", - // - @"DELETE FROM [o] + // + @"DELETE FROM [o] FROM [Order Details] AS [o] WHERE 0 = 1"); } @@ -579,18 +579,18 @@ UPDATE [c] SET [c].[ContactName] = N'Updated' FROM [Customers] AS [c] WHERE [c].[CustomerID] = @__customer_0", - // - @"@__customer_0='ALFKI' (Size = 5) (DbType = StringFixedLength) + // + @"@__customer_0='ALFKI' (Size = 5) (DbType = StringFixedLength) SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE [c].[CustomerID] = @__customer_0", - // - @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] + // + @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE 0 = 1", - // - @"UPDATE [c] + // + @"UPDATE [c] SET [c].[ContactName] = N'Updated' FROM [Customers] AS [c] WHERE 0 = 1"); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerFixture.cs index 5b3cebbf0d5..7743e93ef16 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerFixture.cs @@ -5,7 +5,9 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class TPCFiltersInheritanceBulkUpdatesSqlServerFixture : TPCInheritanceBulkUpdatesSqlServerFixture { - protected override string StoreName => "TPCFiltersInheritanceBulkUpdatesTest"; + protected override string StoreName + => "TPCFiltersInheritanceBulkUpdatesTest"; - protected override bool EnableFilters => true; + protected override bool EnableFilters + => true; } diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs index 8aa8fe3c054..d0bc3be79ec 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs @@ -3,7 +3,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; -public class TPCFiltersInheritanceBulkUpdatesSqlServerTest : TPCFiltersInheritanceBulkUpdatesTestBase +public class TPCFiltersInheritanceBulkUpdatesSqlServerTest : TPCFiltersInheritanceBulkUpdatesTestBase< + TPCFiltersInheritanceBulkUpdatesSqlServerFixture> { public TPCFiltersInheritanceBulkUpdatesSqlServerTest(TPCFiltersInheritanceBulkUpdatesSqlServerFixture fixture) : base(fixture) @@ -171,7 +172,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs index 36188a00e19..f82f8612c75 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs @@ -171,7 +171,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerFixture.cs index 9b373bbbe85..8058c3f4c9a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerFixture.cs @@ -5,7 +5,9 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class TPTFiltersInheritanceBulkUpdatesSqlServerFixture : TPTInheritanceBulkUpdatesSqlServerFixture { - protected override string StoreName => "TPTFiltersInheritanceBulkUpdatesTest"; + protected override string StoreName + => "TPTFiltersInheritanceBulkUpdatesTest"; - protected override bool EnableFilters => true; + protected override bool EnableFilters + => true; } diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerTest.cs index 8a1fe8c4562..2775a72e82a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqlServerTest.cs @@ -3,7 +3,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; -public class TPTFiltersInheritanceBulkUpdatesSqlServerTest : TPTFiltersInheritanceBulkUpdatesTestBase +public class TPTFiltersInheritanceBulkUpdatesSqlServerTest : TPTFiltersInheritanceBulkUpdatesTestBase< + TPTFiltersInheritanceBulkUpdatesSqlServerFixture> { public TPTFiltersInheritanceBulkUpdatesSqlServerTest(TPTFiltersInheritanceBulkUpdatesSqlServerFixture fixture) : base(fixture) @@ -158,7 +159,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqlServerTest.cs index bf4ee21df4c..9c462c05430 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqlServerTest.cs @@ -140,7 +140,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.SqlServer.FunctionalTests/CommandConfigurationTest.cs b/test/EFCore.SqlServer.FunctionalTests/CommandConfigurationTest.cs index f31858b5d30..f1565da3b89 100644 --- a/test/EFCore.SqlServer.FunctionalTests/CommandConfigurationTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/CommandConfigurationTest.cs @@ -3,6 +3,7 @@ // ReSharper disable UnusedAutoPropertyAccessor.Local // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class CommandConfigurationTest : IClassFixture diff --git a/test/EFCore.SqlServer.FunctionalTests/CommandInterceptionSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/CommandInterceptionSqlServerTest.cs index 2ed3e99f4eb..8c7d5123a40 100644 --- a/test/EFCore.SqlServer.FunctionalTests/CommandInterceptionSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/CommandInterceptionSqlServerTest.cs @@ -98,7 +98,6 @@ void ConnectionOnInfoMessage(object sender, SqlInfoMessageEventArgs args) return interceptor.CommandText; } - protected class StatisticsCommandInterceptor : CommandInterceptorBase { public StatisticsCommandInterceptor() diff --git a/test/EFCore.SqlServer.FunctionalTests/ConnectionInterceptionSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/ConnectionInterceptionSqlServerTest.cs index dc34876cf0b..a4cb6f08103 100644 --- a/test/EFCore.SqlServer.FunctionalTests/ConnectionInterceptionSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/ConnectionInterceptionSqlServerTest.cs @@ -84,7 +84,8 @@ protected override bool ShouldSubscribeToDiagnosticListener } public class ConnectionInterceptionWithConnectionStringSqlServerTest - : ConnectionInterceptionSqlServerTestBase, IClassFixture + : ConnectionInterceptionSqlServerTestBase, + IClassFixture { public ConnectionInterceptionWithConnectionStringSqlServerTest(InterceptionSqlServerFixture fixture) : base(fixture) diff --git a/test/EFCore.SqlServer.FunctionalTests/CustomConvertersSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/CustomConvertersSqlServerTest.cs index d6c75cdba05..f8bded4ff01 100644 --- a/test/EFCore.SqlServer.FunctionalTests/CustomConvertersSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/CustomConvertersSqlServerTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; [SqlServerCondition(SqlServerCondition.IsNotSqlAzure)] diff --git a/test/EFCore.SqlServer.FunctionalTests/DbContextPoolingTest.cs b/test/EFCore.SqlServer.FunctionalTests/DbContextPoolingTest.cs index 6a6d0de1e12..0d97fbe7d00 100644 --- a/test/EFCore.SqlServer.FunctionalTests/DbContextPoolingTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/DbContextPoolingTest.cs @@ -474,9 +474,10 @@ var serviceProvider Assert.Equal("Options", context.ConstructorUsed); } + private class WithParameterlessConstructorContext : DbContext { - public string ConstructorUsed { get; set; } + public string ConstructorUsed { get; } public WithParameterlessConstructorContext() { @@ -1582,7 +1583,9 @@ public async Task Handle_open_connection_when_returning_to_pool_for_external_con [InlineData(false, true, true)] [InlineData(true, true, true)] public async Task Handle_open_connection_when_returning_to_pool_for_owned_connection_with_factory( - bool async, bool openWithEf, bool withDependencyInjection) + bool async, + bool openWithEf, + bool withDependencyInjection) { var options = new DbContextOptionsBuilder() .UseSqlServer(SqlServerNorthwindTestStoreFactory.NorthwindConnectionString) @@ -1656,7 +1659,10 @@ public async Task Handle_open_connection_when_returning_to_pool_for_owned_connec [InlineData(false, false, true, true)] [InlineData(true, false, true, true)] public async Task Handle_open_connection_when_returning_to_pool_for_external_connection_with_factory( - bool async, bool startsOpen, bool openWithEf, bool withDependencyInjection) + bool async, + bool startsOpen, + bool openWithEf, + bool withDependencyInjection) { using var connection = new SqlConnection(SqlServerNorthwindTestStoreFactory.NorthwindConnectionString); diff --git a/test/EFCore.SqlServer.FunctionalTests/EntitySplittingSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/EntitySplittingSqlServerTest.cs index fad595ff441..3dfac60c351 100644 --- a/test/EFCore.SqlServer.FunctionalTests/EntitySplittingSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/EntitySplittingSqlServerTest.cs @@ -9,14 +9,15 @@ public EntitySplittingSqlServerTest(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } - + [ConditionalFact] public virtual async Task Can_roundtrip_with_triggers() { - await InitializeAsync(modelBuilder => + await InitializeAsync( + modelBuilder => { OnModelCreating(modelBuilder); - + modelBuilder.Entity( ob => { @@ -29,8 +30,9 @@ await InitializeAsync(modelBuilder => }, sensitiveLogEnabled: false, seed: c => - { - c.Database.ExecuteSqlRaw($@" + { + c.Database.ExecuteSqlRaw( + @" CREATE OR ALTER TRIGGER [MeterReadingsDetails_Trigger] ON [MeterReadingDetails] FOR INSERT, UPDATE, DELETE AS @@ -38,7 +40,7 @@ ON [MeterReadingDetails] IF @@ROWCOUNT = 0 return END"); - }); + }); await using (var context = CreateContext()) { @@ -74,8 +76,8 @@ public override async Task Can_roundtrip() INSERT INTO [MeterReadings] ([ReadingStatus]) OUTPUT INSERTED.[Id] VALUES (@p0);", - // - @"@p1='1' + // + @"@p1='1' @p2='100' (Size = 4000) @p3=NULL (Size = 4000) @@ -83,8 +85,8 @@ OUTPUT INSERTED.[Id] SET NOCOUNT ON; INSERT INTO [MeterReadingDetails] ([Id], [CurrentRead], [PreviousRead]) VALUES (@p1, @p2, @p3);", - // - @"SELECT TOP(2) [m].[Id], [m0].[CurrentRead], [m0].[PreviousRead], [m].[ReadingStatus] + // + @"SELECT TOP(2) [m].[Id], [m0].[CurrentRead], [m0].[PreviousRead], [m].[ReadingStatus] FROM [MeterReadings] AS [m] INNER JOIN [MeterReadingDetails] AS [m0] ON [m].[Id] = [m0].[Id]"); } diff --git a/test/EFCore.SqlServer.FunctionalTests/MemoryOptimizedTablesTest.cs b/test/EFCore.SqlServer.FunctionalTests/MemoryOptimizedTablesTest.cs index 33342d1969e..417f7368ea6 100644 --- a/test/EFCore.SqlServer.FunctionalTests/MemoryOptimizedTablesTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/MemoryOptimizedTablesTest.cs @@ -5,6 +5,7 @@ // ReSharper disable CollectionNeverUpdated.Local // ReSharper disable UnusedMember.Local // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; [SqlServerCondition(SqlServerCondition.SupportsMemoryOptimized)] diff --git a/test/EFCore.SqlServer.FunctionalTests/Migrations/MigrationsSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Migrations/MigrationsSqlServerTest.cs index 63e98ed88d1..321f52dfca2 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Migrations/MigrationsSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Migrations/MigrationsSqlServerTest.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.EntityFrameworkCore.Metadata.Internal; +using System.Globalization; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal; using Microsoft.EntityFrameworkCore.SqlServer.Internal; using Microsoft.EntityFrameworkCore.SqlServer.Metadata.Internal; @@ -173,11 +173,12 @@ public virtual async Task Create_memory_optimized_table() { await Test( _ => { }, - builder => builder.UseIdentityColumns().Entity("People", b => - { - b.ToTable(tb => tb.IsMemoryOptimized()); - b.Property("Id"); - }), + builder => builder.UseIdentityColumns().Entity( + "People", b => + { + b.ToTable(tb => tb.IsMemoryOptimized()); + b.Property("Id"); + }), model => { var table = Assert.Single(model.Tables); @@ -234,11 +235,12 @@ public virtual async Task Create_memory_optimized_temporal_table() { await Test( _ => { }, - builder => builder.UseIdentityColumns().Entity("People", b => - { - b.ToTable("Customers", tb => tb.IsMemoryOptimized().IsTemporal()); - b.Property("Id"); - }), + builder => builder.UseIdentityColumns().Entity( + "People", b => + { + b.ToTable("Customers", tb => tb.IsMemoryOptimized().IsTemporal()); + b.Property("Id"); + }), model => { var table = Assert.Single(model.Tables); @@ -282,8 +284,8 @@ IF SERVERPROPERTY('IsXTPSupported') = 1 EXEC(N' ALTER DATABASE CURRENT SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT ON;')", - // - @"DECLARE @historyTableSchema sysname = SCHEMA_NAME() + // + @"DECLARE @historyTableSchema sysname = SCHEMA_NAME() EXEC(N'CREATE TABLE [Customers] ( [Id] int NOT NULL IDENTITY, [PeriodEnd] datetime2 GENERATED ALWAYS AS ROW END HIDDEN NOT NULL, @@ -529,7 +531,7 @@ await Test( builder => { }, builder => builder.Entity("People").Property("Age").HasPrecision(precision) .HasDefaultValue( - TimeSpan.Parse("12:34:56", System.Globalization.CultureInfo.InvariantCulture).Add(TimeSpan.FromTicks(ticksToAdd))), + TimeSpan.Parse("12:34:56", CultureInfo.InvariantCulture).Add(TimeSpan.FromTicks(ticksToAdd))), model => { var table = Assert.Single(model.Tables); @@ -803,7 +805,8 @@ await Test( }, model => { - Assert.Collection(model.Tables, + Assert.Collection( + model.Tables, t => { Assert.Equal("Animal", t.Name); @@ -3502,12 +3505,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); e.Property("Discount"); - e.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), builder => builder.Entity( "Customer", e => @@ -3654,7 +3659,6 @@ await Test( ttb.HasPeriodEnd("End"); })); }), - builder => { }, builder => builder.Entity( "Customer", e => @@ -3715,7 +3719,6 @@ await Test( ttb.HasPeriodEnd("End"); })); }), - builder => { }, builder => builder.Entity( "Customer", e => @@ -5043,7 +5046,6 @@ await Test( public virtual async Task Convert_temporal_table_using_custom_default_schema_to_normal_table() { await Test( - builder => builder.HasDefaultSchema("myDefaultSchema"), builder => builder.Entity( "Customer", e => @@ -5103,7 +5105,6 @@ await Test( public virtual async Task Convert_temporal_table_using_custom_default_schema_and_explicit_history_schema_to_normal_table() { await Test( - builder => builder.HasDefaultSchema("myDefaultSchema"), builder => builder.Entity( "Customer", e => @@ -5650,12 +5651,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); e.Property("Name"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), builder => { }, builder => builder.Entity("Customer").Property("End").HasComment("My comment").ValueGeneratedOnAddOrUpdate(), @@ -5697,12 +5700,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), builder => builder.Entity( "Customer", e => @@ -5752,11 +5757,11 @@ await Test( e.ToTable( tb => tb.IsTemporal( - ttb => - { - ttb.HasPeriodStart("SystemTimeStart"); - ttb.HasPeriodEnd("SystemTimeEnd"); - }) + ttb => + { + ttb.HasPeriodStart("SystemTimeStart"); + ttb.HasPeriodEnd("SystemTimeEnd"); + }) .HasComment("Table comment")); }), model => @@ -6460,12 +6465,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), builder => builder.Entity( "Customer", e => @@ -6545,14 +6552,15 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), - builder => builder.Entity( "Customer", e => { @@ -6563,12 +6571,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable("ModifiedCustomers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "ModifiedCustomers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), model => { @@ -6636,14 +6646,15 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), - builder => builder.Entity( "Customer", e => { @@ -6654,12 +6665,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("ModifiedHistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("ModifiedHistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), model => { @@ -6720,12 +6733,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), builder => builder.Entity( "Customer", e => @@ -6797,12 +6812,14 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), builder => builder.Entity( "Customer", e => @@ -6883,14 +6900,15 @@ await Test( e.Property("End").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); e.Property("Name"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), - builder => builder.Entity( "Customer", e => { @@ -6899,12 +6917,14 @@ await Test( e.Property("End").HasComment("My comment").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); e.Property("Name"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start").HasColumnName("ModifiedStart"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start").HasColumnName("ModifiedStart"); + ttb.HasPeriodEnd("End"); + })); }), model => { @@ -6947,14 +6967,15 @@ await Test( e.HasKey("Id"); e.Property("Name"); e.Property("DateOfBirth"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start"); + ttb.HasPeriodEnd("End"); + })); }), - builder => builder.Entity( "Customer", e => { @@ -6963,12 +6984,14 @@ await Test( e.Property("End").HasComment("My comment").ValueGeneratedOnAddOrUpdate(); e.HasKey("Id"); e.Property("Name"); - e.ToTable("Customers", tb => tb.IsTemporal(ttb => - { - ttb.UseHistoryTable("HistoryTable"); - ttb.HasPeriodStart("Start").HasColumnName("ModifiedStart"); - ttb.HasPeriodEnd("End"); - })); + e.ToTable( + "Customers", tb => tb.IsTemporal( + ttb => + { + ttb.UseHistoryTable("HistoryTable"); + ttb.HasPeriodStart("Start").HasColumnName("ModifiedStart"); + ttb.HasPeriodEnd("End"); + })); }), model => { @@ -7034,47 +7057,55 @@ await Test( builder => { }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); + + e.OwnsOne( + "Owned", "OwnedRequiredReference", o => + { + o.Property("Date"); + o.ToJson(); + }); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); + e.Navigation("OwnedRequiredReference").IsRequired(); }); - - e.OwnsOne("Owned", "OwnedRequiredReference", o => - { - o.Property("Date"); - o.ToJson(); - }); - - e.Navigation("OwnedRequiredReference").IsRequired(); - }); }, model => { @@ -7125,39 +7156,46 @@ await Test( builder => { }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - e.OwnsOne("Owned", "json_reference", o => - { - o.OwnsOne("Nested", "json_reference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); - - e.OwnsMany("Owned2", "json_collection", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + e.OwnsOne( + "Owned", "json_reference", o => + { + o.OwnsOne( + "Nested", "json_reference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsMany( + "Owned2", "json_collection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); }); - }); }, model => { @@ -7197,56 +7235,65 @@ CONSTRAINT [PK_Entity] PRIMARY KEY ([Id]) public virtual async Task Add_json_columns_to_existing_table() { await Test( - builder => builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - }), - builder => - { - builder.Entity("Entity", e => + builder => builder.Entity( + "Entity", e => { e.Property("Id").ValueGeneratedOnAdd(); e.HasKey("Id"); e.Property("Name"); - - e.OwnsOne("Owned", "OwnedReference", o => + }), + builder => + { + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); - e.OwnsOne("Owned", "OwnedRequiredReference", o => - { - o.Property("Date"); - o.ToJson(); - }); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsOne( + "Owned", "OwnedRequiredReference", o => + { + o.Property("Date"); + o.ToJson(); + }); - e.Navigation("OwnedRequiredReference").IsRequired(); + e.Navigation("OwnedRequiredReference").IsRequired(); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); }); - }); }, model => { @@ -7281,10 +7328,10 @@ await Test( AssertSql( @"ALTER TABLE [Entity] ADD [OwnedCollection] nvarchar(max) NULL;", - // - @"ALTER TABLE [Entity] ADD [OwnedReference] nvarchar(max) NULL;", - // - @"ALTER TABLE [Entity] ADD [OwnedRequiredReference] nvarchar(max) NOT NULL DEFAULT N'';"); + // + @"ALTER TABLE [Entity] ADD [OwnedReference] nvarchar(max) NULL;", + // + @"ALTER TABLE [Entity] ADD [OwnedRequiredReference] nvarchar(max) NOT NULL DEFAULT N'';"); } [ConditionalFact] @@ -7293,46 +7340,54 @@ public virtual async Task Remove_json_columns_from_existing_table() await Test( builder => { - builder.Entity("Entity", e => + builder.Entity( + "Entity", e => + { + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); + }); + }, + builder => builder.Entity( + "Entity", e => { e.Property("Id").ValueGeneratedOnAdd(); e.HasKey("Id"); e.Property("Name"); - e.OwnsOne("Owned", "OwnedReference", o => - { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); - - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); - }); - }); - }, - builder => builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - }), + }), model => { var table = Assert.Single(model.Tables); @@ -7355,8 +7410,8 @@ FROM [sys].[default_constraints] [d] WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Entity]') AND [c].[name] = N'OwnedCollection'); IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [Entity] DROP CONSTRAINT [' + @var0 + '];'); ALTER TABLE [Entity] DROP COLUMN [OwnedCollection];", - // - @"DECLARE @var1 sysname; + // + @"DECLARE @var1 sysname; SELECT @var1 = [d].[name] FROM [sys].[default_constraints] [d] INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id] @@ -7371,77 +7426,91 @@ public virtual async Task Rename_json_column() await Test( builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson("json_reference"); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson("json_collection"); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson("json_reference"); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson("json_collection"); + }); }); - }); }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson("new_json_reference"); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson("new_json_collection"); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson("new_json_reference"); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson("new_json_collection"); + }); }); - }); }, model => { @@ -7469,8 +7538,8 @@ await Test( AssertSql( @"EXEC sp_rename N'[Entity].[json_reference]', N'new_json_reference', N'COLUMN';", - // - @"EXEC sp_rename N'[Entity].[json_collection]', N'new_json_collection', N'COLUMN';"); + // + @"EXEC sp_rename N'[Entity].[json_collection]', N'new_json_collection', N'COLUMN';"); } [ConditionalFact] @@ -7479,79 +7548,93 @@ public virtual async Task Rename_table_with_json_column() await Test( builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - e.ToTable("Entities"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + e.ToTable("Entities"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); }); - }); }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - e.ToTable("NewEntities"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + e.ToTable("NewEntities"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); }); - }); }, model => { @@ -7579,10 +7662,10 @@ await Test( AssertSql( @"ALTER TABLE [Entities] DROP CONSTRAINT [PK_Entities];", - // - @"EXEC sp_rename N'[Entities]', N'NewEntities';", - // - @"ALTER TABLE [NewEntities] ADD CONSTRAINT [PK_NewEntities] PRIMARY KEY ([Id]);"); + // + @"EXEC sp_rename N'[Entities]', N'NewEntities';", + // + @"ALTER TABLE [NewEntities] ADD CONSTRAINT [PK_NewEntities] PRIMARY KEY ([Id]);"); } [ConditionalFact] @@ -7591,75 +7674,89 @@ public virtual async Task Convert_regular_owned_entities_to_json() await Test( builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + }); }); - }); }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); }); - }); }, model => { @@ -7687,30 +7784,30 @@ await Test( AssertSql( @"DROP TABLE [Entity_NestedCollection];", - // - @"DROP TABLE [Entity_OwnedCollection_NestedCollection2];", - // - @"DROP TABLE [Entity_OwnedCollection];", - // - @"DECLARE @var0 sysname; + // + @"DROP TABLE [Entity_OwnedCollection_NestedCollection2];", + // + @"DROP TABLE [Entity_OwnedCollection];", + // + @"DECLARE @var0 sysname; SELECT @var0 = [d].[name] FROM [sys].[default_constraints] [d] INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id] WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Entity]') AND [c].[name] = N'OwnedReference_Date'); IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [Entity] DROP CONSTRAINT [' + @var0 + '];'); ALTER TABLE [Entity] DROP COLUMN [OwnedReference_Date];", - // - @"DECLARE @var1 sysname; + // + @"DECLARE @var1 sysname; SELECT @var1 = [d].[name] FROM [sys].[default_constraints] [d] INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id] WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Entity]') AND [c].[name] = N'OwnedReference_NestedReference_Number'); IF @var1 IS NOT NULL EXEC(N'ALTER TABLE [Entity] DROP CONSTRAINT [' + @var1 + '];'); ALTER TABLE [Entity] DROP COLUMN [OwnedReference_NestedReference_Number];", - // - @"ALTER TABLE [Entity] ADD [OwnedCollection] nvarchar(max) NULL;", - // - @"ALTER TABLE [Entity] ADD [OwnedReference] nvarchar(max) NULL;"); + // + @"ALTER TABLE [Entity] ADD [OwnedCollection] nvarchar(max) NULL;", + // + @"ALTER TABLE [Entity] ADD [OwnedReference] nvarchar(max) NULL;"); } [ConditionalFact] @@ -7719,75 +7816,89 @@ public virtual async Task Convert_json_entities_to_regular_owned() await Test( builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - o.ToJson(); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson(); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + o.ToJson(); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson(); + }); }); - }); }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); - e.OwnsMany("Owned2", "OwnedCollection", o => - { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + }); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + }); }); - }); }, model => { @@ -7802,28 +7913,28 @@ FROM [sys].[default_constraints] [d] WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Entity]') AND [c].[name] = N'OwnedCollection'); IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [Entity] DROP CONSTRAINT [' + @var0 + '];'); ALTER TABLE [Entity] DROP COLUMN [OwnedCollection];", - // - @"DECLARE @var1 sysname; + // + @"DECLARE @var1 sysname; SELECT @var1 = [d].[name] FROM [sys].[default_constraints] [d] INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id] WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Entity]') AND [c].[name] = N'OwnedReference'); IF @var1 IS NOT NULL EXEC(N'ALTER TABLE [Entity] DROP CONSTRAINT [' + @var1 + '];'); ALTER TABLE [Entity] DROP COLUMN [OwnedReference];", - // - @"ALTER TABLE [Entity] ADD [OwnedReference_Date] datetime2 NULL;", - // - @"ALTER TABLE [Entity] ADD [OwnedReference_NestedReference_Number] int NULL;", - // - @"CREATE TABLE [Entity_NestedCollection] ( + // + @"ALTER TABLE [Entity] ADD [OwnedReference_Date] datetime2 NULL;", + // + @"ALTER TABLE [Entity] ADD [OwnedReference_NestedReference_Number] int NULL;", + // + @"CREATE TABLE [Entity_NestedCollection] ( [OwnedEntityId] int NOT NULL, [Id] int NOT NULL IDENTITY, [Number2] int NOT NULL, CONSTRAINT [PK_Entity_NestedCollection] PRIMARY KEY ([OwnedEntityId], [Id]), CONSTRAINT [FK_Entity_NestedCollection_Entity_OwnedEntityId] FOREIGN KEY ([OwnedEntityId]) REFERENCES [Entity] ([Id]) ON DELETE CASCADE );", - // - @"CREATE TABLE [Entity_OwnedCollection] ( + // + @"CREATE TABLE [Entity_OwnedCollection] ( [EntityId] int NOT NULL, [Id] int NOT NULL IDENTITY, [NestedReference2_Number3] int NULL, @@ -7831,8 +7942,8 @@ CONSTRAINT [FK_Entity_NestedCollection_Entity_OwnedEntityId] FOREIGN KEY ([Owned CONSTRAINT [PK_Entity_OwnedCollection] PRIMARY KEY ([EntityId], [Id]), CONSTRAINT [FK_Entity_OwnedCollection_Entity_EntityId] FOREIGN KEY ([EntityId]) REFERENCES [Entity] ([Id]) ON DELETE CASCADE );", - // - @"CREATE TABLE [Entity_OwnedCollection_NestedCollection2] ( + // + @"CREATE TABLE [Entity_OwnedCollection_NestedCollection2] ( [Owned2EntityId] int NOT NULL, [Owned2Id] int NOT NULL, [Id] int NOT NULL IDENTITY, @@ -7848,34 +7959,39 @@ public virtual async Task Convert_string_column_to_a_json_column_containing_refe await Test( builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - }); + builder.Entity( + "Entity", e => + { + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + }); }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.ToJson("Name"); - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.ToJson("Name"); + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + }); }); - }); }, model => { @@ -7895,36 +8011,41 @@ public virtual async Task Convert_string_column_to_a_json_column_containing_requ await Test( builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - }); + builder.Entity( + "Entity", e => + { + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + }); }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - - e.OwnsOne("Owned", "OwnedReference", o => + builder.Entity( + "Entity", e => { - o.ToJson("Name"); - o.OwnsOne("Nested", "NestedReference", n => - { - n.Property("Number"); - }); - o.OwnsMany("Nested2", "NestedCollection", n => - { - n.Property("Number2"); - }); - o.Property("Date"); - }); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); - e.Navigation("OwnedReference").IsRequired(); - }); + e.OwnsOne( + "Owned", "OwnedReference", o => + { + o.ToJson("Name"); + o.OwnsOne( + "Nested", "NestedReference", n => + { + n.Property("Number"); + }); + o.OwnsMany( + "Nested2", "NestedCollection", n => + { + n.Property("Number2"); + }); + o.Property("Date"); + }); + + e.Navigation("OwnedReference").IsRequired(); + }); }, model => { @@ -7953,34 +8074,39 @@ public virtual async Task Convert_string_column_to_a_json_column_containing_coll await Test( builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - e.Property("Name"); - }); + builder.Entity( + "Entity", e => + { + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + e.Property("Name"); + }); }, builder => { - builder.Entity("Entity", e => - { - e.Property("Id").ValueGeneratedOnAdd(); - e.HasKey("Id"); - - e.OwnsMany("Owned2", "OwnedCollection", o => + builder.Entity( + "Entity", e => { - o.OwnsOne("Nested3", "NestedReference2", n => - { - n.Property("Number3"); - }); - o.OwnsMany("Nested4", "NestedCollection2", n => - { - n.Property("Number4"); - }); - o.Property("Date2"); - o.ToJson("Name"); + e.Property("Id").ValueGeneratedOnAdd(); + e.HasKey("Id"); + + e.OwnsMany( + "Owned2", "OwnedCollection", o => + { + o.OwnsOne( + "Nested3", "NestedReference2", n => + { + n.Property("Number3"); + }); + o.OwnsMany( + "Nested4", "NestedCollection2", n => + { + n.Property("Number4"); + }); + o.Property("Date2"); + o.ToJson("Name"); + }); }); - }); }, model => { diff --git a/test/EFCore.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs b/test/EFCore.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs index 1cca398428b..660729c7ab1 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Properties/TestAssemblyConditions.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // Skip the entire assembly if not on Windows and no external SQL Server is configured + [assembly: SqlServerConfiguredCondition] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs index 8bb0537cb63..5c57a77d4df 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs @@ -1440,8 +1440,8 @@ public override async Task Filtered_include_context_accessed_inside_filter(bool AssertSql( @"SELECT COUNT(*) FROM [Level1] AS [l]", - // - @"@__p_0='True' + // + @"@__p_0='True' SELECT [l].[Id], [l].[Date], [l].[Name], [t0].[Id], [t0].[OneToOne_Required_PK_Date], [t0].[Level1_Optional_Id], [t0].[Level1_Required_Id], [t0].[Level2_Name], [t0].[OneToMany_Optional_Inverse2Id], [t0].[OneToMany_Required_Inverse2Id], [t0].[OneToOne_Optional_PK_Inverse2Id] FROM [Level1] AS [l] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs index 793a61e4db2..58bbc4fadf2 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs @@ -1256,8 +1256,8 @@ FROM [LevelTwo] AS [l0] WHERE [l0].[Name] <> N'Foo' OR [l0].[Name] IS NULL ) AS [t] ORDER BY [l].[Id], [t].[Id]", - // - @"SELECT [t0].[Name], [l].[Id], [t].[Id] + // + @"SELECT [t0].[Name], [l].[Id], [t].[Id] FROM [LevelOne] AS [l] OUTER APPLY ( SELECT TOP(1) [l0].[Id] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs index 89ed35d533f..b6eb10b53f8 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Xunit; using Xunit.Sdk; namespace Microsoft.EntityFrameworkCore.Query; diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/EntitySplittingQuerySqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/Query/EntitySplittingQuerySqlServerFixture.cs index c3707747859..f935b669f31 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/EntitySplittingQuerySqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/EntitySplittingQuerySqlServerFixture.cs @@ -5,5 +5,6 @@ namespace Microsoft.EntityFrameworkCore.Query; public class EntitySplittingQuerySqlServerFixture : EntitySplittingQueryFixtureBase { - protected override ITestStoreFactory TestStoreFactory => SqlServerTestStoreFactory.Instance; + protected override ITestStoreFactory TestStoreFactory + => SqlServerTestStoreFactory.Instance; } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/FromSqlQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/FromSqlQuerySqlServerTest.cs index 24779e95628..2e9686a627c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/FromSqlQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/FromSqlQuerySqlServerTest.cs @@ -62,7 +62,9 @@ public override async Task FromSqlRaw_queryable_composed_after_removing_whitespa @"SELECT [m].[CustomerID], [m].[Address], [m].[City], [m].[CompanyName], [m].[ContactName], [m].[ContactTitle], [m].[Country], [m].[Fax], [m].[Phone], [m].[PostalCode], [m].[Region] FROM ( -" + @" " + @" +" + + @" " + + @" SELECT @@ -295,6 +297,7 @@ public override async Task FromSqlInterpolated_queryable_with_parameters_inline_ SELECT * FROM ""Customers"" WHERE ""City"" = @p0 AND ""ContactTitle"" = @p1"); } + public override async Task FromSql_queryable_with_parameters_inline_interpolated(bool async) { await base.FromSql_queryable_with_parameters_inline_interpolated(async); @@ -844,7 +847,6 @@ public override async Task FromSqlRaw_composed_with_common_table_expression(bool var exception = await Assert.ThrowsAsync(() => base.FromSqlRaw_composed_with_common_table_expression(async)); - Assert.Equal(RelationalStrings.FromSqlNonComposable, exception.Message); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs index 7900a1f0a1b..7a1417f5d38 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs @@ -2571,7 +2571,7 @@ public virtual async Task Where_AtTimeZone_datetimeoffset_parameter(bool async) Assert.Equal(2, mission.Id); AssertSql( - @"@__dateTime_1='0002-03-01T13:00:00.0000000+00:00' + @"@__dateTime_1='0002-03-01T13:00:00.0000000+00:00' @__timeZone_2='UTC' (Size = 8000) (DbType = AnsiString) SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Duration], [m].[Rating], [m].[Timeline] @@ -2596,7 +2596,7 @@ public virtual async Task Where_AtTimeZone_datetimeoffset_column(bool async) Assert.Equal(2, mission.Id); AssertSql( - @"SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Duration], [m].[Rating], [m].[Timeline] + @"SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Duration], [m].[Rating], [m].[Timeline] FROM [Missions] AS [m] WHERE ([m].[Timeline] AT TIME ZONE 'UTC') = '0002-03-01T13:00:00.0000000+00:00'"); } @@ -2640,7 +2640,7 @@ public virtual async Task Where_AtTimeZone_datetime_parameter(bool async) Assert.Equal(3, mission.Id); AssertSql( - @"@__dateTime_1='0010-05-03T12:00:00.0000000' + @"@__dateTime_1='0010-05-03T12:00:00.0000000' @__timeZone_2='UTC' (Size = 8000) (DbType = AnsiString) SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Duration], [m].[Rating], [m].[Timeline] @@ -7860,10 +7860,12 @@ FROM [Weapons] AS [w] } public override async Task - Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) + Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + bool async) { await base - .Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async); + .Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + async); AssertSql( @"SELECT [g].[Nickname], [g].[SquadId], [t0].[Key], [t0].[Count] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerFixture.cs index ee81ce182db..f37adfcfbed 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerFixture.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.EntityFrameworkCore.TestModels.JsonQuery; - namespace Microsoft.EntityFrameworkCore.Query; public class JsonQuerySqlServerFixture : JsonQueryFixtureBase diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs index 1bc475c78ed..7d5e2f3d440 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs @@ -104,7 +104,6 @@ FROM [JsonEntitiesBasic] AS [j] WHERE CAST(LEN(CAST(JSON_VALUE([j].[OwnedReferenceRoot],'$.Name') AS nvarchar(max))) AS int) > 2"); } - public override async Task Basic_json_projection_enum_inside_json_entity(bool async) { await base.Basic_json_projection_enum_inside_json_entity(async); @@ -424,7 +423,6 @@ ORDER BY [j0].[Id] ORDER BY [j].[Id]"); } - public override async Task Project_json_entity_FirstOrDefault_subquery_deduplication_and_outer_reference(bool async) { await base.Project_json_entity_FirstOrDefault_subquery_deduplication_and_outer_reference(async); @@ -455,7 +453,6 @@ ORDER BY [j0].[Id] ORDER BY [j].[Id]"); } - public override async Task Json_entity_with_inheritance_basic_projection(bool async) { await base.Json_entity_with_inheritance_basic_projection(async); diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ManyToManyHeterogeneousQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ManyToManyHeterogeneousQuerySqlServerTest.cs index 87ef82a66c0..05db574b290 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ManyToManyHeterogeneousQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ManyToManyHeterogeneousQuerySqlServerTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public class ManyToManyHeterogeneousQuerySqlServerTest : ManyToManyHeterogeneousQueryRelationalTestBase diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs index fc3813106c5..b9901202fba 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs @@ -1990,5 +1990,4 @@ public override async Task Include_collection_with_client_filter(bool async) private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); - } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindFunctionsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindFunctionsQuerySqlServerTest.cs index b758105149f..31fc17cabaf 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindFunctionsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindFunctionsQuerySqlServerTest.cs @@ -2074,12 +2074,13 @@ public virtual async Task StandardDeviation(bool async) var query = ctx.Set() .GroupBy(od => od.ProductID) - .Select(g => new - { - ProductID = g.Key, - SampleStandardDeviation = EF.Functions.StandardDeviationSample(g.Select(od => od.UnitPrice)), - PopulationStandardDeviation = EF.Functions.StandardDeviationPopulation(g.Select(od => od.UnitPrice)) - }); + .Select( + g => new + { + ProductID = g.Key, + SampleStandardDeviation = EF.Functions.StandardDeviationSample(g.Select(od => od.UnitPrice)), + PopulationStandardDeviation = EF.Functions.StandardDeviationPopulation(g.Select(od => od.UnitPrice)) + }); var results = async ? await query.ToListAsync() diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindQueryFiltersQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindQueryFiltersQuerySqlServerTest.cs index dda09c81347..b03ec35f6c4 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindQueryFiltersQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindQueryFiltersQuerySqlServerTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public class NorthwindQueryFiltersQuerySqlServerTest : NorthwindQueryFiltersQueryTestBase< diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs index 537ebe92d45..54f2075b0dd 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs @@ -1000,26 +1000,26 @@ WHERE [o0].[OrderID] < 10250 ORDER BY [t].[CustomerID], [t].[OrderDate]"); } - public override async Task Except_non_entity(bool async) - { - await base.Except_non_entity(async); + public override async Task Except_non_entity(bool async) + { + await base.Except_non_entity(async); - AssertSql( -@"SELECT [c].[CustomerID] + AssertSql( + @"SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[ContactTitle] = N'Owner' EXCEPT SELECT [c0].[CustomerID] FROM [Customers] AS [c0] WHERE [c0].[City] = N'México D.F.'"); - } + } - public override async Task Except_simple_followed_by_projecting_constant(bool async) - { - await base.Except_simple_followed_by_projecting_constant(async); + public override async Task Except_simple_followed_by_projecting_constant(bool async) + { + await base.Except_simple_followed_by_projecting_constant(async); - AssertSql( -@"SELECT 1 + AssertSql( + @"SELECT 1 FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -1027,14 +1027,14 @@ FROM [Customers] AS [c] SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM [Customers] AS [c0] ) AS [t]"); - } + } - public override async Task Except_nested(bool async) - { - await base.Except_nested(async); + public override async Task Except_nested(bool async) + { + await base.Except_nested(async); - AssertSql( -@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] + AssertSql( + @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE [c].[ContactTitle] = N'Owner' EXCEPT @@ -1045,28 +1045,28 @@ FROM [Customers] AS [c0] SELECT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM [Customers] AS [c1] WHERE [c1].[City] = N'Seattle'"); - } + } - public override async Task Intersect_non_entity(bool async) - { - await base.Intersect_non_entity(async); + public override async Task Intersect_non_entity(bool async) + { + await base.Intersect_non_entity(async); - AssertSql( -@"SELECT [c].[CustomerID] + AssertSql( + @"SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[City] = N'México D.F.' INTERSECT SELECT [c0].[CustomerID] FROM [Customers] AS [c0] WHERE [c0].[ContactTitle] = N'Owner'"); - } + } - public override async Task Intersect_nested(bool async) - { - await base.Intersect_nested(async); + public override async Task Intersect_nested(bool async) + { + await base.Intersect_nested(async); - AssertSql( -@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] + AssertSql( + @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE [c].[City] = N'México D.F.' INTERSECT @@ -1077,14 +1077,14 @@ FROM [Customers] AS [c0] SELECT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM [Customers] AS [c1] WHERE [c1].[Fax] IS NOT NULL"); - } + } - public override async Task Concat_nested(bool async) - { - await base.Concat_nested(async); + public override async Task Concat_nested(bool async) + { + await base.Concat_nested(async); - AssertSql( -@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] + AssertSql( + @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE [c].[City] = N'México D.F.' UNION ALL @@ -1095,14 +1095,14 @@ UNION ALL SELECT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM [Customers] AS [c1] WHERE [c1].[City] = N'London'"); - } + } - public override async Task Union_nested(bool async) - { - await base.Union_nested(async); + public override async Task Union_nested(bool async) + { + await base.Union_nested(async); - AssertSql( -@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] + AssertSql( + @"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] WHERE [c].[ContactTitle] = N'Owner' UNION @@ -1113,35 +1113,35 @@ FROM [Customers] AS [c0] SELECT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM [Customers] AS [c1] WHERE [c1].[City] = N'London'"); - } + } - public override async Task Union_non_entity(bool async) - { - await base.Union_non_entity(async); + public override async Task Union_non_entity(bool async) + { + await base.Union_non_entity(async); - AssertSql( -@"SELECT [c].[CustomerID] + AssertSql( + @"SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[ContactTitle] = N'Owner' UNION SELECT [c0].[CustomerID] FROM [Customers] AS [c0] WHERE [c0].[City] = N'México D.F.'"); - } + } - public override async Task Concat_non_entity(bool async) - { - await base.Concat_non_entity(async); + public override async Task Concat_non_entity(bool async) + { + await base.Concat_non_entity(async); - AssertSql( -@"SELECT [c].[CustomerID] + AssertSql( + @"SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[City] = N'México D.F.' UNION ALL SELECT [c0].[CustomerID] FROM [Customers] AS [c0] WHERE [c0].[ContactTitle] = N'Owner'"); - } + } public override async Task Collection_projection_after_set_operation_fails_if_distinct(bool async) { diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs index 41dbe06312c..2c4f7740e88 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.EntityFrameworkCore.SqlServer.Internal; -using Xunit.Sdk; namespace Microsoft.EntityFrameworkCore.Query; @@ -24,18 +23,14 @@ public virtual void Check_all_tests_overridden() => TestHelpers.AssertAllMethodsOverridden(GetType()); public override async Task Include_collection_skip_take_no_order_by(bool async) - { - Assert.Equal( + => Assert.Equal( SqlServerStrings.SplitQueryOffsetWithoutOrderBy, (await Assert.ThrowsAsync(() => base.Include_collection_skip_take_no_order_by(async))).Message); - } public override async Task Include_collection_skip_no_order_by(bool async) - { - Assert.Equal( + => Assert.Equal( SqlServerStrings.SplitQueryOffsetWithoutOrderBy, (await Assert.ThrowsAsync(() => base.Include_collection_skip_no_order_by(async))).Message); - } public override async Task Include_reference_GroupBy_Select(bool async) { diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs index db17c8ebb18..dc31a4854b7 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs @@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore.SqlServer.Internal; using Microsoft.EntityFrameworkCore.TestModels.Northwind; -using Xunit.Sdk; namespace Microsoft.EntityFrameworkCore.Query; @@ -106,11 +105,9 @@ ORDER BY [c].[CompanyName] DESC } public override async Task Include_collection_skip_no_order_by(bool async) - { - Assert.Equal( + => Assert.Equal( SqlServerStrings.SplitQueryOffsetWithoutOrderBy, (await Assert.ThrowsAsync(() => base.Include_collection_skip_no_order_by(async))).Message); - } public override async Task Include_collection_take_no_order_by(bool async) { @@ -135,11 +132,9 @@ FROM [Customers] AS [c] } public override async Task Include_collection_skip_take_no_order_by(bool async) - { - Assert.Equal( + => Assert.Equal( SqlServerStrings.SplitQueryOffsetWithoutOrderBy, (await Assert.ThrowsAsync(() => base.Include_collection_skip_take_no_order_by(async))).Message); - } public override async Task Include_reference_and_collection(bool async) { diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs index a08c6241bb5..265e97aac9f 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs @@ -1979,5 +1979,4 @@ public override async Task Include_collection_with_client_filter(bool async) private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); - } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs index 717e349abd8..0fb1704ee70 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs @@ -1958,16 +1958,16 @@ ELSE CAST(0 AS bit) END"); } - public override async Task Bool_not_equal_nullable_int_HasValue(bool async) - { - await base.Bool_not_equal_nullable_int_HasValue(async); + public override async Task Bool_not_equal_nullable_int_HasValue(bool async) + { + await base.Bool_not_equal_nullable_int_HasValue(async); - AssertSql( - @"SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] + AssertSql( + @"SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] WHERE [e].[NullableIntA] IS NULL", - // - @"@__prm_0='False' + // + @"@__prm_0='False' SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] @@ -1975,14 +1975,14 @@ WHERE @__prm_0 <> CASE WHEN [e].[NullableIntA] IS NOT NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END", - // - @"SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] + // + @"SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] WHERE [e].[BoolB] <> CASE WHEN [e].[NullableIntA] IS NOT NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END"); - } + } public override async Task Bool_not_equal_nullable_bool_compared_to_null(bool async) { diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/OwnedEntityQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/OwnedEntityQuerySqlServerTest.cs index 593a2ed35c4..f87d95e9359 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/OwnedEntityQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/OwnedEntityQuerySqlServerTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public class OwnedEntityQuerySqlServerTest : OwnedEntityQueryRelationalTestBase diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/QueryBugsTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/QueryBugsTest.cs index a04598dca01..4db6b45e0fc 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/QueryBugsTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/QueryBugsTest.cs @@ -1245,7 +1245,7 @@ join eRoot in ctx.Entities.Include(e => e.Children) on eVersion.RootEntityId equals eRoot.Id into RootEntities from eRootJoined in RootEntities.DefaultIfEmpty() - // ReSharper disable once ConstantNullCoalescingCondition + // ReSharper disable once ConstantNullCoalescingCondition select new { One = 1, Coalesce = eRootJoined ?? (eVersion ?? eRootJoined) }; var result = query.ToList(); @@ -1259,7 +1259,7 @@ join eRoot in ctx.Entities on eVersion.RootEntityId equals eRoot.Id into RootEntities from eRootJoined in RootEntities.DefaultIfEmpty() - // ReSharper disable once ConstantNullCoalescingCondition + // ReSharper disable once ConstantNullCoalescingCondition select new { One = eRootJoined, @@ -1284,7 +1284,7 @@ join eRoot in ctx.Entities on eVersion.RootEntityId equals eRoot.Id into RootEntities from eRootJoined in RootEntities.DefaultIfEmpty() - // ReSharper disable once MergeConditionalExpression + // ReSharper disable once MergeConditionalExpression #pragma warning disable IDE0029 // Use coalesce expression select eRootJoined != null ? eRootJoined : eVersion; #pragma warning restore IDE0029 // Use coalesce expression @@ -1442,18 +1442,15 @@ public void Seed() Contacts.AddRange( new ServiceOperatorContact6986 { - UserName = "service.operator@esoterix.co.uk", - ServiceOperator6986 = ServiceOperators.OrderBy(o => o.Id).First() + UserName = "service.operator@esoterix.co.uk", ServiceOperator6986 = ServiceOperators.OrderBy(o => o.Id).First() }, new EmployerContact6986 { - UserName = "uwe@esoterix.co.uk", - Employer6986 = Employers.OrderBy(e => e.Id).First(e => e.Name == "UWE") + UserName = "uwe@esoterix.co.uk", Employer6986 = Employers.OrderBy(e => e.Id).First(e => e.Name == "UWE") }, new EmployerContact6986 { - UserName = "hp@esoterix.co.uk", - Employer6986 = Employers.OrderBy(e => e.Id).First(e => e.Name == "Hewlett Packard") + UserName = "hp@esoterix.co.uk", Employer6986 = Employers.OrderBy(e => e.Id).First(e => e.Name == "Hewlett Packard") }, new Contact6986 { UserName = "noroles@esoterix.co.uk" }); SaveChanges(); @@ -3585,8 +3582,7 @@ public void Seed() AddRange( new Employee13025 { - Name = "Test1", - Devices = new List { new() { DeviceId = 1, Device = "Battery" } } + Name = "Test1", Devices = new List { new() { DeviceId = 1, Device = "Battery" } } }); SaveChanges(); @@ -8492,8 +8488,7 @@ public void Seed() Add( new SecondOwner23211 { - Dependents = new List { new(), new() }, - Owned = new OwnedType23211 { Value = "A" } + Dependents = new List { new(), new() }, Owned = new OwnedType23211 { Value = "A" } }); SaveChanges(); @@ -8688,8 +8683,7 @@ public virtual async Task Operators_combine_nullability_of_entity_shapers() l => l.leftg.DefaultIfEmpty(), (x, y) => new MyContext19253.JoinResult19253 { - Left = y, - Right = x.right + Left = y, Right = x.right }) .Where(z => z.Left.Equals(null))) .ToList(); @@ -8731,8 +8725,7 @@ FROM [B] AS [b0] l => l.leftg.DefaultIfEmpty(), (x, y) => new MyContext19253.JoinResult19253 { - Left = y, - Right = x.right + Left = y, Right = x.right }) .Where(z => z.Left.Equals(null))) .ToList(); @@ -8774,8 +8767,7 @@ FROM [B] AS [b0] l => l.leftg.DefaultIfEmpty(), (x, y) => new MyContext19253.JoinResult19253 { - Left = y, - Right = x.right + Left = y, Right = x.right })) .ToList(); @@ -8815,8 +8807,7 @@ FROM [B] AS [b0] l => l.leftg.DefaultIfEmpty(), (x, y) => new MyContext19253.JoinResult19253 { - Left = y, - Right = x.right + Left = y, Right = x.right })) .ToList(); @@ -10152,8 +10143,7 @@ private static IQueryable SelectParent25225(MyContext25225 .Select( c => new CollectionViewModel25225 { - Id = c.Id, - ParentId = c.ParentId, + Id = c.Id, ParentId = c.ParentId, }) .ToArray() }); diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/RawSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/RawSqlServerTest.cs index 312d5ec08e3..083bd18132b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/RawSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/RawSqlServerTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public class RawSqlServerTest : NonSharedModelTestBase diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/SimpleQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/SimpleQuerySqlServerTest.cs index 3e4a2587ed5..54d472a9af5 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/SimpleQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/SimpleQuerySqlServerTest.cs @@ -406,8 +406,8 @@ public override async Task StoreType_for_UDF_used(bool async) SELECT [m].[Id], [m].[SomeDate] FROM [MyEntities] AS [m] WHERE [m].[SomeDate] = @__date_0", - // - @"@__date_0='2012-12-12T00:00:00.0000000' (DbType = DateTime) + // + @"@__date_0='2012-12-12T00:00:00.0000000' (DbType = DateTime) SELECT [m].[Id], [m].[SomeDate] FROM [MyEntities] AS [m] @@ -474,7 +474,7 @@ UNION ALL FROM [Dogs] AS [d] ) AS [t] WHERE [t].[Species] IS NOT NULL AND ([t].[Species] LIKE N'F%')"); - } + } [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -483,13 +483,13 @@ public virtual async Task Muliple_occurrences_of_FromSql_in_group_by_aggregate(b var contextFactory = await InitializeAsync(); using var context = contextFactory.CreateContext(); var query = context.DemoEntities - .FromSqlRaw("SELECT * FROM DemoEntities WHERE Id = {0}", new SqlParameter { Value = 1 }) - .Select(e => e.Id); + .FromSqlRaw("SELECT * FROM DemoEntities WHERE Id = {0}", new SqlParameter { Value = 1 }) + .Select(e => e.Id); var query2 = context.DemoEntities - .Where(e => query.Contains(e.Id)) - .GroupBy(e => e.Id) - .Select(g => new { g.Key, Aggregate = g.Count() }); + .Where(e => query.Contains(e.Id)) + .GroupBy(e => e.Id) + .Select(g => new { g.Key, Aggregate = g.Count() }); if (async) { @@ -517,7 +517,7 @@ SELECT 1 protected class Context27427 : DbContext { public Context27427(DbContextOptions options) - : base(options) + : base(options) { } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs index 51de11ca2c0..90564132857 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs @@ -784,8 +784,8 @@ UNION ALL FROM [Officers] AS [o0] ) AS [t0] ORDER BY [t0].[Nickname], [t0].[SquadId]), 0)", - // - @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] + // + @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] FROM ( SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], N'Gear' AS [Discriminator] FROM [Gears] AS [g] @@ -855,8 +855,8 @@ UNION ALL FROM [Officers] AS [o0] ) AS [t0] ORDER BY [t0].[Nickname], [t0].[SquadId]) IS NULL", - // - @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] + // + @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] FROM ( SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], N'Gear' AS [Discriminator] FROM [Gears] AS [g] @@ -8936,8 +8936,8 @@ UNION ALL FROM [Officers] AS [o] ) AS [t] WHERE ([t].[Rank] & @__rank_0) = @__rank_0", - // - @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] + // + @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] FROM ( SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], N'Gear' AS [Discriminator] FROM [Gears] AS [g] @@ -8945,8 +8945,8 @@ UNION ALL SELECT [o].[Nickname], [o].[SquadId], [o].[AssignedCityName], [o].[CityOfBirthName], [o].[FullName], [o].[HasSoulPatch], [o].[LeaderNickname], [o].[LeaderSquadId], [o].[Rank], N'Officer' AS [Discriminator] FROM [Officers] AS [o] ) AS [t]", - // - @"@__rank_0='2' (Nullable = true) + // + @"@__rank_0='2' (Nullable = true) SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] FROM ( @@ -8957,8 +8957,8 @@ UNION ALL FROM [Officers] AS [o] ) AS [t] WHERE ([t].[Rank] | @__rank_0) <> @__rank_0", - // - @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] + // + @"SELECT [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOfBirthName], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank], [t].[Discriminator] FROM ( SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], N'Gear' AS [Discriminator] FROM [Gears] AS [g] @@ -9016,8 +9016,8 @@ UNION ALL FROM [Officers] AS [o] ) AS [t] WHERE ([t].[Rank] & @__ranks_0) <> 0", - // - @"@__ranks_0='134' + // + @"@__ranks_0='134' SELECT CASE WHEN ([t].[Rank] | @__ranks_0) = @__ranks_0 THEN CAST(1 AS bit) @@ -9030,8 +9030,8 @@ UNION ALL SELECT [o].[Rank] FROM [Officers] AS [o] ) AS [t]", - // - @"@__ranks_0='134' + // + @"@__ranks_0='134' SELECT CASE WHEN ([t].[Rank] | ([t].[Rank] | (@__ranks_0 | ([t].[Rank] | @__ranks_0)))) = @__ranks_0 THEN CAST(1 AS bit) diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTest.cs index be8869a7159..5cf78c2d49c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public class TPCInheritanceQuerySqlServerTest : TPCInheritanceQuerySqlServerTestBase diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTestBase.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTestBase.cs index 7f6c31bcb63..9d1fae2b40b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTestBase.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCInheritanceQuerySqlServerTestBase.cs @@ -409,9 +409,7 @@ public override async Task OfType_Union_subquery(bool async) } public override void Setting_foreign_key_to_a_different_type_throws() - { - base.Setting_foreign_key_to_a_different_type_throws(); - } + => base.Setting_foreign_key_to_a_different_type_throws(); public override async Task Subquery_OfType(bool async) { diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyNoTrackingQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyNoTrackingQuerySqlServerTest.cs index 745ec88473c..9c347fcc87e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyNoTrackingQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyNoTrackingQuerySqlServerTest.cs @@ -2346,8 +2346,8 @@ FROM [UnidirectionalEntityCompositeKeyUnidirectionalEntityTwo] AS [u0] public override async Task Filtered_include_skip_navigation_order_by_skip_take_unidirectional(bool async) { await base.Filtered_include_skip_navigation_order_by_skip_take_unidirectional(async); -AssertSql( - @"SELECT [u].[Key1], [u].[Key2], [u].[Key3], [u].[Name], [t0].[Id], [t0].[CollectionInverseId], [t0].[Name], [t0].[ReferenceInverseId], [t0].[Id0] + AssertSql( + @"SELECT [u].[Key1], [u].[Key2], [u].[Key3], [u].[Name], [t0].[Id], [t0].[CollectionInverseId], [t0].[Name], [t0].[ReferenceInverseId], [t0].[Id0] FROM [UnidirectionalEntityCompositeKeys] AS [u] LEFT JOIN ( SELECT [t].[Id], [t].[CollectionInverseId], [t].[Name], [t].[ReferenceInverseId], [t].[Id0], [t].[CompositeId1], [t].[CompositeId2], [t].[CompositeId3] @@ -2477,8 +2477,8 @@ public override async Task GetType_in_hierarchy_in_intermediate_type_unidirectio public override async Task GetType_in_hierarchy_in_leaf_type_unidirectional(bool async) { await base.GetType_in_hierarchy_in_leaf_type_unidirectional(async); -AssertSql( - @"SELECT [u].[Id], [u].[Name], [u].[Number], [u].[IsGreen], N'UnidirectionalEntityLeaf' AS [Discriminator] + AssertSql( + @"SELECT [u].[Id], [u].[Name], [u].[Number], [u].[IsGreen], N'UnidirectionalEntityLeaf' AS [Discriminator] FROM [UnidirectionalLeaves] AS [u]"); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyQuerySqlServerTest.cs index 893f1ef34d4..7b12e3c2ed3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCManyToManyQuerySqlServerTest.cs @@ -2164,8 +2164,8 @@ FROM [UnidirectionalLeaves] AS [u2] public override async Task Select_skip_navigation_unidirectional(bool async) { await base.Select_skip_navigation_unidirectional(async); -AssertSql( - @"SELECT [u].[Id], [t].[Id], [t].[Name], [t].[LeftId], [t].[RightId] + AssertSql( + @"SELECT [u].[Id], [t].[Id], [t].[Name], [t].[LeftId], [t].[RightId] FROM [UnidirectionalEntityOnes] AS [u] LEFT JOIN ( SELECT [u1].[Id], [u1].[Name], [u0].[LeftId], [u0].[RightId] @@ -2486,8 +2486,8 @@ public override async Task GetType_in_hierarchy_in_base_type_unidirectional(bool public override async Task GetType_in_hierarchy_in_intermediate_type_unidirectional(bool async) { await base.GetType_in_hierarchy_in_intermediate_type_unidirectional(async); -AssertSql( - @"SELECT [u].[Id], [u].[Name], [u].[Number], NULL AS [IsGreen], N'UnidirectionalEntityBranch' AS [Discriminator] + AssertSql( + @"SELECT [u].[Id], [u].[Name], [u].[Number], NULL AS [IsGreen], N'UnidirectionalEntityBranch' AS [Discriminator] FROM [UnidirectionalBranches] AS [u]"); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCRelationshipsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCRelationshipsQuerySqlServerTest.cs index c7507321367..8e4833e2e04 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCRelationshipsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCRelationshipsQuerySqlServerTest.cs @@ -529,7 +529,7 @@ WHERE [r].[Name] <> N'Bar' OR [r].[Name] IS NULL public override async Task Include_reference_with_inheritance(bool async) { await base.Include_reference_with_inheritance(async); - + AssertSql( @"SELECT [t].[Id], [t].[Name], [t].[BaseId], [t].[Discriminator], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id], [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [o].[Id], [o].[Name], [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t1].[OwnedReferenceOnDerived_Id], [t1].[OwnedReferenceOnDerived_Name], [t0].[BaseParentId], [t0].[Name], [t0].[Discriminator] FROM ( @@ -1340,8 +1340,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -1359,8 +1359,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -1378,8 +1378,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -1408,7 +1408,7 @@ FROM [DerivedCollectionsOnBase] AS [d1] public override async Task Include_collection_with_inheritance_reverse_split(bool async) { await base.Include_collection_with_inheritance_reverse_split(async); - + AssertSql( @"SELECT [t].[Id], [t].[BaseParentId], [t].[Name], [t].[DerivedProperty], [t].[Discriminator], [t0].[Id], [t0].[Name], [t0].[BaseId], [t0].[Discriminator], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id], [o].[Id], [o].[Name], [t1].[OwnedReferenceOnDerived_Id], [t1].[OwnedReferenceOnDerived_Name] FROM ( @@ -1434,8 +1434,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t1].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t1].[Id] END ORDER BY [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] FROM ( SELECT [b].[Id], [b].[BaseParentId] FROM [BaseCollectionsOnBase] AS [b] @@ -1460,8 +1460,8 @@ WHEN [t1].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t1].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t0].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] FROM ( SELECT [b].[Id], [b].[BaseParentId] FROM [BaseCollectionsOnBase] AS [b] @@ -1511,8 +1511,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id], [b].[Name] FROM [BaseEntities] AS [b] @@ -1531,8 +1531,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id], [b].[Name] FROM [BaseEntities] AS [b] @@ -1551,8 +1551,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id], [b].[Name] FROM [BaseEntities] AS [b] @@ -1609,8 +1609,8 @@ WHEN [t1].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t1].[Id] END WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] FROM ( SELECT [b].[Id], [b].[BaseParentId], [b].[Name] FROM [BaseCollectionsOnBase] AS [b] @@ -1636,8 +1636,8 @@ WHEN [t1].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t1].[Id] INNER JOIN [OwnedCollections] AS [o0] ON [t0].[Id] = [o0].[BaseInheritanceRelationshipEntityId] WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] FROM ( SELECT [b].[Id], [b].[BaseParentId], [b].[Name] FROM [BaseCollectionsOnBase] AS [b] @@ -1687,8 +1687,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -1706,8 +1706,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -1725,8 +1725,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [c].[Id], [c].[Name], [c].[ParentId], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [c].[Id], [c].[Name], [c].[ParentId], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -1769,8 +1769,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END ORDER BY [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM [CollectionsOnBase] AS [c] LEFT JOIN ( SELECT [b].[Id] @@ -1789,8 +1789,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM [CollectionsOnBase] AS [c] LEFT JOIN ( SELECT [b].[Id] @@ -1834,8 +1834,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id], [b].[Name] FROM [BaseEntities] AS [b] @@ -1854,8 +1854,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id], [b].[Name] FROM [BaseEntities] AS [b] @@ -1874,8 +1874,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] WHERE [t].[Name] <> N'Bar' OR [t].[Name] IS NULL ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [c].[Id], [c].[Name], [c].[ParentId], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [c].[Id], [c].[Name], [c].[ParentId], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id], [b].[Name] FROM [BaseEntities] AS [b] @@ -1920,8 +1920,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END WHERE [c].[Name] <> N'Bar' OR [c].[Name] IS NULL ORDER BY [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM [CollectionsOnBase] AS [c] LEFT JOIN ( SELECT [b].[Id] @@ -1941,8 +1941,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] WHERE [c].[Name] <> N'Bar' OR [c].[Name] IS NULL ORDER BY [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [c].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM [CollectionsOnBase] AS [c] LEFT JOIN ( SELECT [b].[Id] @@ -1973,20 +1973,20 @@ public override async Task Include_collection_with_inheritance_on_derived1_split FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] ORDER BY [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN [OwnedCollections] AS [o0] ON [d].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [d].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [t].[Id], [t].[BaseParentId], [t].[Name], [t].[DerivedProperty], [t].[Discriminator], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [t].[Id], [t].[BaseParentId], [t].[Name], [t].[DerivedProperty], [t].[Discriminator], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN ( @@ -2007,20 +2007,20 @@ public override async Task Include_collection_with_inheritance_on_derived2_split FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] ORDER BY [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN [OwnedCollections] AS [o0] ON [d].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [d].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [t].[Id], [t].[Name], [t].[ParentId], [t].[DerivedInheritanceRelationshipEntityId], [t].[Discriminator], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [t].[Id], [t].[Name], [t].[ParentId], [t].[DerivedInheritanceRelationshipEntityId], [t].[Discriminator], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN ( @@ -2078,8 +2078,8 @@ FROM [DerivedCollectionsOnDerived] AS [d0] LEFT JOIN [DerivedEntities] AS [d] ON [t].[ParentId] = [d].[Id] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM ( SELECT [b].[Id], [b].[ParentId] FROM [BaseCollectionsOnDerived] AS [b] @@ -2091,8 +2091,8 @@ FROM [DerivedCollectionsOnDerived] AS [d0] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN [OwnedCollections] AS [o0] ON [d].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [d].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [d].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM ( SELECT [b].[Id], [b].[ParentId] FROM [BaseCollectionsOnDerived] AS [b] @@ -2135,8 +2135,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t1].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t1].[Id] END ORDER BY [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2161,8 +2161,8 @@ WHEN [t1].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t1].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2187,8 +2187,8 @@ WHEN [t1].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t1].[Id] END INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id]", - // - @"SELECT [t2].[Id], [t2].[Name], [t2].[ParentCollectionId], [t2].[ParentReferenceId], [t2].[Discriminator], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] + // + @"SELECT [t2].[Id], [t2].[Name], [t2].[ParentCollectionId], [t2].[ParentReferenceId], [t2].[Discriminator], [t].[Id], [t0].[Id], [o].[BaseInheritanceRelationshipEntityId], [t1].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2237,8 +2237,8 @@ FROM [DerivedReferencesOnBase] AS [d0] ) AS [t] ON [d].[Id] = [t].[BaseParentId] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] ORDER BY [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN ( SELECT [b].[Id], [b].[BaseParentId] @@ -2250,8 +2250,8 @@ FROM [DerivedReferencesOnBase] AS [d0] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN [OwnedCollections] AS [o0] ON [d].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN ( SELECT [b].[Id], [b].[BaseParentId] @@ -2263,8 +2263,8 @@ FROM [DerivedReferencesOnBase] AS [d1] LEFT JOIN [OwnedReferences] AS [o] ON [d].[Id] = [o].[BaseInheritanceRelationshipEntityId] INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [d].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId]", - // - @"SELECT [t0].[Id], [t0].[Name], [t0].[ParentCollectionId], [t0].[ParentReferenceId], [t0].[Discriminator], [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId] + // + @"SELECT [t0].[Id], [t0].[Name], [t0].[ParentCollectionId], [t0].[ParentReferenceId], [t0].[Discriminator], [d].[Id], [t].[Id], [o].[BaseInheritanceRelationshipEntityId] FROM [DerivedEntities] AS [d] LEFT JOIN ( SELECT [b].[Id], [b].[BaseParentId] @@ -2320,8 +2320,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t2].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t2].[Id] END ORDER BY [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] FROM ( SELECT [n].[Id], [n].[ParentReferenceId] FROM [NestedCollections] AS [n] @@ -2353,8 +2353,8 @@ WHEN [t2].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t2].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t1].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] FROM ( SELECT [n].[Id], [n].[ParentReferenceId] FROM [NestedCollections] AS [n] @@ -2410,8 +2410,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2429,8 +2429,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2448,8 +2448,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t1].[Id0], [t1].[Name0], [t1].[ParentCollectionId], [t1].[ParentReferenceId], [t1].[Discriminator0] AS [Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t1].[Id0], [t1].[Name0], [t1].[ParentCollectionId], [t1].[ParentReferenceId], [t1].[Discriminator0] AS [Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2521,8 +2521,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t2].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t2].[Id] END ORDER BY [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] FROM ( SELECT [n].[Id], [n].[ParentCollectionId] FROM [NestedReferences] AS [n] @@ -2554,8 +2554,8 @@ WHEN [t2].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t2].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t1].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] FROM ( SELECT [n].[Id], [n].[ParentCollectionId] FROM [NestedReferences] AS [n] @@ -2611,8 +2611,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2630,8 +2630,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2649,8 +2649,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [t1].[Id], [t1].[BaseParentId], [t1].[Name], [t1].[DerivedProperty], [t1].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2674,8 +2674,8 @@ UNION ALL FROM [DerivedCollectionsOnBase] AS [d1] ) AS [t1] ON [t].[Id] = [t1].[BaseParentId] ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id], [t1].[Id]", - // - @"SELECT [t2].[Id], [t2].[Name], [t2].[ParentCollectionId], [t2].[ParentReferenceId], [t2].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id], [t1].[Id] + // + @"SELECT [t2].[Id], [t2].[Name], [t2].[ParentCollectionId], [t2].[ParentReferenceId], [t2].[Discriminator], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id], [t1].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2744,8 +2744,8 @@ WHERE [d].[OwnedReferenceOnDerived_Id] IS NOT NULL WHEN [t2].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t2].[Id] END ORDER BY [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] FROM ( SELECT [n].[Id], [n].[ParentCollectionId] FROM [NestedCollections] AS [n] @@ -2777,8 +2777,8 @@ WHEN [t2].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t2].[Id] END INNER JOIN [OwnedCollections] AS [o0] ON [t1].[Id] = [o0].[BaseInheritanceRelationshipEntityId] ORDER BY [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [t0].[Id], [t1].[Id], [o].[BaseInheritanceRelationshipEntityId], [t2].[Id] FROM ( SELECT [n].[Id], [n].[ParentCollectionId] FROM [NestedCollections] AS [n] @@ -2815,7 +2815,7 @@ WHEN [t2].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t2].[Id] public override async Task Nested_include_collection_reference_on_non_entity_base_split(bool async) { await base.Nested_include_collection_reference_on_non_entity_base_split(async); - + AssertSql( @"SELECT [r].[Id], [r].[Name] FROM [ReferencedEntities] AS [r] @@ -2845,8 +2845,8 @@ SELECT [d].[Id] FROM [DerivedEntities] AS [d] ) AS [t] ORDER BY [t].[Id]", - // - @"SELECT [t0].[Id], [t0].[BaseParentId], [t0].[Name], [t0].[DerivedProperty], [t0].[Discriminator], [t].[Id] + // + @"SELECT [t0].[Id], [t0].[BaseParentId], [t0].[Name], [t0].[DerivedProperty], [t0].[Discriminator], [t].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2887,8 +2887,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] END WHERE [t].[Id] >= 4 ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [o0].[BaseInheritanceRelationshipEntityId], [o0].[Id], [o0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2907,8 +2907,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] INNER JOIN [OwnedCollections] AS [o0] ON [t].[Id] = [o0].[BaseInheritanceRelationshipEntityId] WHERE [t].[Id] >= 4 ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[DerivedInheritanceRelationshipEntityId], [d0].[Id], [d0].[Name], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] @@ -2927,8 +2927,8 @@ WHEN [t0].[OwnedReferenceOnDerived_Id] IS NOT NULL THEN [t0].[Id] INNER JOIN [DerivedEntities_OwnedCollectionOnDerived] AS [d0] ON [t].[Id] = [d0].[DerivedInheritanceRelationshipEntityId] WHERE [t].[Id] >= 4 ORDER BY [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id]", - // - @"SELECT [d0].[Id], [d0].[Name], [d0].[ParentId], [d0].[DerivedInheritanceRelationshipEntityId], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] + // + @"SELECT [d0].[Id], [d0].[Name], [d0].[ParentId], [d0].[DerivedInheritanceRelationshipEntityId], [t].[Id], [o].[BaseInheritanceRelationshipEntityId], [t0].[Id] FROM ( SELECT [b].[Id] FROM [BaseEntities] AS [b] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs index 4a32335afc1..0a12babd7f5 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs @@ -9299,10 +9299,12 @@ FROM [Weapons] AS [w] } public override async Task - Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) + Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + bool async) { await base - .Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async); + .Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + async); AssertSql( @"SELECT [g].[Nickname], [g].[SquadId], [t0].[Key], [t0].[Count] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTInheritanceQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTInheritanceQuerySqlServerTest.cs index cd42a51933f..24ab58949a5 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTInheritanceQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTInheritanceQuerySqlServerTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Query; public class TPTInheritanceQuerySqlServerTest : TPTInheritanceQueryTestBase diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyNoTrackingQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyNoTrackingQuerySqlServerTest.cs index fe8b38d5fbb..c96c9eaaf59 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyNoTrackingQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyNoTrackingQuerySqlServerTest.cs @@ -2243,8 +2243,8 @@ WHERE [e0].[Id] < 10 public override async Task Filtered_include_skip_navigation_order_by_unidirectional(bool async) { await base.Filtered_include_skip_navigation_order_by_unidirectional(async); -AssertSql( - @"SELECT [u].[Id], [u].[CollectionInverseId], [u].[Name], [u].[ReferenceInverseId], [t].[Id], [t].[CollectionInverseId], [t].[ExtraId], [t].[Name], [t].[ReferenceInverseId], [t].[ThreeId], [t].[TwoId] + AssertSql( + @"SELECT [u].[Id], [u].[CollectionInverseId], [u].[Name], [u].[ReferenceInverseId], [t].[Id], [t].[CollectionInverseId], [t].[ExtraId], [t].[Name], [t].[ReferenceInverseId], [t].[ThreeId], [t].[TwoId] FROM [UnidirectionalEntityThrees] AS [u] LEFT JOIN ( SELECT [u1].[Id], [u1].[CollectionInverseId], [u1].[ExtraId], [u1].[Name], [u1].[ReferenceInverseId], [u0].[ThreeId], [u0].[TwoId] @@ -2295,8 +2295,8 @@ FROM [UnidirectionalEntityCompositeKeyUnidirectionalEntityTwo] AS [u0] public override async Task Filtered_include_skip_navigation_order_by_skip_take_unidirectional(bool async) { await base.Filtered_include_skip_navigation_order_by_skip_take_unidirectional(async); -AssertSql( - @"SELECT [u].[Key1], [u].[Key2], [u].[Key3], [u].[Name], [t0].[Id], [t0].[CollectionInverseId], [t0].[Name], [t0].[ReferenceInverseId], [t0].[Id0] + AssertSql( + @"SELECT [u].[Key1], [u].[Key2], [u].[Key3], [u].[Name], [t0].[Id], [t0].[CollectionInverseId], [t0].[Name], [t0].[ReferenceInverseId], [t0].[Id0] FROM [UnidirectionalEntityCompositeKeys] AS [u] LEFT JOIN ( SELECT [t].[Id], [t].[CollectionInverseId], [t].[Name], [t].[ReferenceInverseId], [t].[Id0], [t].[CompositeId1], [t].[CompositeId2], [t].[CompositeId3] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyQuerySqlServerTest.cs index 5771b78c464..41923bc5db1 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTManyToManyQuerySqlServerTest.cs @@ -2388,8 +2388,8 @@ public override async Task Includes_accessed_via_different_path_are_merged_unidi public override async Task Select_many_over_skip_navigation_where_non_equality_unidirectional(bool async) { await base.Select_many_over_skip_navigation_where_non_equality_unidirectional(async); -AssertSql( - @"SELECT [t].[Id], [t].[CollectionInverseId], [t].[ExtraId], [t].[Name], [t].[ReferenceInverseId] + AssertSql( + @"SELECT [t].[Id], [t].[CollectionInverseId], [t].[ExtraId], [t].[Name], [t].[ReferenceInverseId] FROM [UnidirectionalEntityOnes] AS [u] LEFT JOIN ( SELECT [u1].[Id], [u1].[CollectionInverseId], [u1].[ExtraId], [u1].[Name], [u1].[ReferenceInverseId], [u0].[OneId] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs index df3ec61adfc..12b2d81a09d 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.EntityFrameworkCore.TestModels.ComplexNavigationsModel; -using Xunit.Abstractions; namespace Microsoft.EntityFrameworkCore.Query; -public class TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest : ComplexNavigationsCollectionsSharedTypeQueryRelationalTestBase< - TemporalComplexNavigationsSharedTypeQuerySqlServerFixture> +public class TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest : + ComplexNavigationsCollectionsSharedTypeQueryRelationalTestBase< + TemporalComplexNavigationsSharedTypeQuerySqlServerFixture> { public TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest( TemporalComplexNavigationsSharedTypeQuerySqlServerFixture fixture, @@ -21,12 +21,12 @@ public TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest( protected override Expression RewriteServerQueryExpression(Expression serverQueryExpression) { var temporalEntityTypes = new List - { - typeof(Level1), - typeof(Level2), - typeof(Level3), - typeof(Level4), - }; + { + typeof(Level1), + typeof(Level2), + typeof(Level3), + typeof(Level4), + }; var rewriter = new TemporalPointInTimeQueryRewriter(Fixture.ChangesDate, temporalEntityTypes); @@ -550,8 +550,8 @@ public override async Task Filtered_include_context_accessed_inside_filter(bool AssertSql( @"SELECT COUNT(*) FROM [Level1] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l]", - // - @"@__p_0='True' + // + @"@__p_0='True' SELECT [l].[Id], [l].[Date], [l].[Name], [l].[PeriodEnd], [l].[PeriodStart], [t0].[Id], [t0].[OneToOne_Required_PK_Date], [t0].[Level1_Optional_Id], [t0].[Level1_Required_Id], [t0].[Level2_Name], [t0].[OneToMany_Optional_Inverse2Id], [t0].[OneToMany_Required_Inverse2Id], [t0].[OneToOne_Optional_PK_Inverse2Id], [t0].[PeriodEnd], [t0].[PeriodStart] FROM [Level1] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] @@ -599,26 +599,19 @@ SELECT COUNT(*) // TODO: remove later!!!!! public override Task Filtered_include_is_considered_loaded(bool async) - { - return base.Filtered_include_is_considered_loaded(async); - } + => base.Filtered_include_is_considered_loaded(async); public override Task Filtered_include_calling_methods_directly_on_parameter_throws(bool async) - { - return base.Filtered_include_calling_methods_directly_on_parameter_throws(async); - } + => base.Filtered_include_calling_methods_directly_on_parameter_throws(async); public override Task Filtered_include_different_filter_set_on_same_navigation_twice(bool async) - { - return base.Filtered_include_different_filter_set_on_same_navigation_twice(async); - } + => base.Filtered_include_different_filter_set_on_same_navigation_twice(async); public override Task Filtered_include_different_filter_set_on_same_navigation_twice_multi_level(bool async) - { - return base.Filtered_include_different_filter_set_on_same_navigation_twice_multi_level(async); - } + => base.Filtered_include_different_filter_set_on_same_navigation_twice_multi_level(async); - public override async Task Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(bool async) + public override async Task + Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(bool async) { await base.Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(async); @@ -798,7 +791,8 @@ WHERE [l0].[OneToOne_Required_PK_Date] IS NOT NULL AND [l0].[Level1_Required_Id] ORDER BY [l].[Id], [t0].[OneToMany_Optional_Inverse2Id], [t0].[c]"); } - public override async Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(bool async) + public override async Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level( + bool async) { await base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(async); @@ -827,7 +821,8 @@ WHEN [t0].[OneToOne_Required_PK_Date] IS NOT NULL AND [t0].[Level1_Required_Id] ORDER BY [t].[Id], [t1].[Id]"); } - public override async Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(bool async) + public override async Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level( + bool async) { await base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(async); @@ -2027,7 +2022,8 @@ WHEN [t0].[Level2_Required_Id] IS NOT NULL AND [t0].[OneToMany_Required_Inverse3 ORDER BY [l].[Id], [t].[Id], [t0].[Id], [t1].[Id]"); } - public override async Task Multi_level_include_correct_PK_is_chosen_as_the_join_predicate_for_queries_that_join_same_table_multiple_times(bool async) + public override async Task + Multi_level_include_correct_PK_is_chosen_as_the_join_predicate_for_queries_that_join_same_table_multiple_times(bool async) { await base.Multi_level_include_correct_PK_is_chosen_as_the_join_predicate_for_queries_that_join_same_table_multiple_times(async); @@ -3010,10 +3006,12 @@ WHEN [l1].[OneToOne_Required_PK_Date] IS NOT NULL AND [l1].[Level1_Required_Id] ORDER BY [t].[Id], [t0].[c], [t0].[Id1]"); } - public override async Task SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(bool async) + public override async Task SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection( + bool async) { - var exception = await Assert.ThrowsAsync(() => - base.SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(async)); + var exception = await Assert.ThrowsAsync( + () => + base.SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(async)); Assert.StartsWith(CoreStrings.ExpressionParameterizationExceptionSensitive("X").Substring(0, 30), exception.Message); Assert.True(exception.InnerException is InvalidCastException); diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsSharedTypeQuerySqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsSharedTypeQuerySqlServerFixture.cs index 6ae643eef24..ff282eac79c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsSharedTypeQuerySqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsSharedTypeQuerySqlServerFixture.cs @@ -16,44 +16,52 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con { base.OnModelCreating(modelBuilder, context); - modelBuilder.Entity().ToTable(nameof(Level1), tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + modelBuilder.Entity().ToTable( + nameof(Level1), tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); } protected override void Configure(OwnedNavigationBuilder l2) { base.Configure(l2); - l2.ToTable(nameof(Level1), tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + l2.ToTable( + nameof(Level1), tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); } protected override void Configure(OwnedNavigationBuilder l3) { base.Configure(l3); - l3.ToTable(nameof(Level1), tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + l3.ToTable( + nameof(Level1), tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); } protected override void Configure(OwnedNavigationBuilder l4) { base.Configure(l4); - l4.ToTable(nameof(Level1), tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + l4.ToTable( + nameof(Level1), tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); } protected override void Seed(ComplexNavigationsContext context) @@ -67,7 +75,8 @@ protected override void Seed(ComplexNavigationsContext context) context.Database.ExecuteSqlRaw($"ALTER TABLE [{tableName}] SET (SYSTEM_VERSIONING = OFF)"); context.Database.ExecuteSqlRaw($"DELETE FROM [{tableName + "History"}]"); - context.Database.ExecuteSqlRaw($"ALTER TABLE [{tableName}] SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].[{tableName + "History"}]))"); + context.Database.ExecuteSqlRaw( + $"ALTER TABLE [{tableName}] SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].[{tableName + "History"}]))"); foreach (var entityOne in context.ChangeTracker.Entries().Where(e => e.Entity is Level1).Select(e => e.Entity)) { @@ -98,6 +107,7 @@ protected override void Seed(ComplexNavigationsContext context) context.Database.ExecuteSqlRaw($"UPDATE [{tableName + "History"}] SET PeriodEnd = '2020-07-01T07:00:00.0000000Z'"); context.Database.ExecuteSqlRaw($"ALTER TABLE [{tableName}] ADD PERIOD FOR SYSTEM_TIME ([PeriodStart], [PeriodEnd])"); - context.Database.ExecuteSqlRaw($"ALTER TABLE [{tableName}] SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].[{tableName + "History"}]))"); + context.Database.ExecuteSqlRaw( + $"ALTER TABLE [{tableName}] SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].[{tableName + "History"}]))"); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerFixture.cs index 8818b6ac78b..1c0502d2293 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerFixture.cs @@ -15,11 +15,13 @@ protected override string StoreName protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { modelBuilder.Entity().ToTable(tb => tb.IsTemporal()); - modelBuilder.Entity().ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasPrecision(0); - ttb.HasPeriodEnd("PeriodEnd").HasPrecision(0); - })); + modelBuilder.Entity().ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasPrecision(0); + ttb.HasPeriodEnd("PeriodEnd").HasPrecision(0); + })); modelBuilder.Entity().ToTable(tb => tb.IsTemporal()); modelBuilder.Entity().ToTable(tb => tb.IsTemporal()); modelBuilder.Entity().ToTable(tb => tb.IsTemporal()); diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs index adb012050ac..7e620263cd7 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Xunit.Abstractions; - namespace Microsoft.EntityFrameworkCore.Query; [SqlServerCondition(SqlServerCondition.SupportsTemporalTablesCascadeDelete)] -public class TemporalOwnedQuerySqlServerTest : OwnedQueryRelationalTestBase +public class TemporalOwnedQuerySqlServerTest : OwnedQueryRelationalTestBase< + TemporalOwnedQuerySqlServerTest.TemporalOwnedQuerySqlServerFixture> { public TemporalOwnedQuerySqlServerTest(TemporalOwnedQuerySqlServerFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture) @@ -20,16 +19,16 @@ protected override bool CanExecuteQueryString protected override Expression RewriteServerQueryExpression(Expression serverQueryExpression) { var temporalEntityTypes = new List - { - typeof(OwnedPerson), - typeof(Branch), - typeof(LeafA), - typeof(LeafB), - typeof(Barton), - typeof(Star), - typeof(Planet), - typeof(Moon), - }; + { + typeof(OwnedPerson), + typeof(Branch), + typeof(LeafA), + typeof(LeafB), + typeof(Barton), + typeof(Star), + typeof(Planet), + typeof(Moon), + }; var rewriter = new TemporalPointInTimeQueryRewriter(Fixture.ChangesDate, temporalEntityTypes); @@ -1158,7 +1157,8 @@ FROM [Order] AS [o3] ORDER BY [m].[Id], [t].[Id], [t0].[Id], [t1].[Id], [t2].[Id], [t3].[ClientId], [t3].[Id], [t3].[OrderClientId], [t3].[OrderId]"); } - public override async Task Projecting_collection_correlated_with_keyless_entity_after_navigation_works_using_parent_identifiers(bool async) + public override async Task Projecting_collection_correlated_with_keyless_entity_after_navigation_works_using_parent_identifiers( + bool async) { await base.Projecting_collection_correlated_with_keyless_entity_after_navigation_works_using_parent_identifiers(async); @@ -1285,11 +1285,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con modelBuilder.Entity( eb => { - eb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + eb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); eb.IndexerProperty("Name"); var ownedPerson = new OwnedPerson { Id = 1 }; ownedPerson["Name"] = "Mona Cy"; @@ -1298,11 +1300,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con eb.OwnsOne( p => p.PersonAddress, ab => { - ab.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + ab.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); ab.IndexerProperty("AddressLine"); ab.IndexerProperty(typeof(int), "ZipCode"); ab.HasData( @@ -1338,11 +1342,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con ab.OwnsOne( a => a.Country, cb => { - cb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + cb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); cb.HasData( new { @@ -1377,11 +1383,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con eb.OwnsMany( p => p.Orders, ob => { - ob.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + ob.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); ob.IndexerProperty("OrderDate"); ob.HasData( new @@ -1416,43 +1424,46 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con } ); - ob.OwnsMany(e => e.Details, odb => - { - odb.ToTable(tb => tb.IsTemporal(ttb => + ob.OwnsMany( + e => e.Details, odb => { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); - odb.HasData( - new - { - Id = -100, - OrderId = -10, - OrderClientId = 1, - Detail = "Discounted Order" - }, - new - { - Id = -101, - OrderId = -10, - OrderClientId = 1, - Detail = "Full Price Order" - }, - new - { - Id = -200, - OrderId = -20, - OrderClientId = 2, - Detail = "Internal Order" - }, - new - { - Id = -300, - OrderId = -30, - OrderClientId = 3, - Detail = "Bulk Order" - }); - }); + odb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); + odb.HasData( + new + { + Id = -100, + OrderId = -10, + OrderClientId = 1, + Detail = "Discounted Order" + }, + new + { + Id = -101, + OrderId = -10, + OrderClientId = 1, + Detail = "Full Price Order" + }, + new + { + Id = -200, + OrderId = -20, + OrderClientId = 2, + Detail = "Internal Order" + }, + new + { + Id = -300, + OrderId = -30, + OrderClientId = 3, + Detail = "Bulk Order" + }); + }); }); }); @@ -1464,11 +1475,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con eb.OwnsOne( p => p.BranchAddress, ab => { - ab.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + ab.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); ab.IndexerProperty("BranchName").IsRequired(); ab.HasData( new @@ -1487,11 +1500,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con ab.OwnsOne( a => a.Country, cb => { - cb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + cb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); cb.HasData( new { @@ -1519,11 +1534,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con eb.OwnsOne( p => p.LeafAAddress, ab => { - ab.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + ab.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); ab.IndexerProperty("LeafType"); ab.HasData( @@ -1537,11 +1554,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con ab.OwnsOne( a => a.Country, cb => { - cb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + cb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); cb.HasOne(c => c.Planet).WithMany().HasForeignKey(c => c.PlanetId) .OnDelete(DeleteBehavior.Restrict); @@ -1566,11 +1585,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con eb.OwnsOne( p => p.LeafBAddress, ab => { - ab.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + ab.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); ab.IndexerProperty("LeafBType").IsRequired(); ab.HasData( new @@ -1583,11 +1604,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con ab.OwnsOne( a => a.Country, cb => { - cb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); + cb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); cb.HasOne(c => c.Planet).WithMany().HasForeignKey(c => c.PlanetId) .OnDelete(DeleteBehavior.Restrict); @@ -1602,41 +1625,53 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con }); }); - modelBuilder.Entity(pb => - { - pb.ToTable(tb => tb.IsTemporal()); - pb.HasData(new Planet { Id = 1, StarId = 1, Name = "Earth" }); - }); + modelBuilder.Entity( + pb => + { + pb.ToTable(tb => tb.IsTemporal()); + pb.HasData( + new Planet + { + Id = 1, + StarId = 1, + Name = "Earth" + }); + }); - modelBuilder.Entity(mb => - { - mb.ToTable(tb => tb.IsTemporal()); - mb.HasData( - new Moon - { - Id = 1, - PlanetId = 1, - Diameter = 3474 - }); - }); + modelBuilder.Entity( + mb => + { + mb.ToTable(tb => tb.IsTemporal()); + mb.HasData( + new Moon + { + Id = 1, + PlanetId = 1, + Diameter = 3474 + }); + }); modelBuilder.Entity( sb => { - sb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); - sb.HasData(new Star { Id = 1, Name = "Sol" }); - sb.OwnsMany( - s => s.Composition, ob => - { - ob.ToTable(tb => tb.IsTemporal(ttb => + sb.ToTable( + tb => tb.IsTemporal( + ttb => { ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); })); + sb.HasData(new Star { Id = 1, Name = "Sol" }); + sb.OwnsMany( + s => s.Composition, ob => + { + ob.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); ob.HasKey(e => e.Id); ob.HasData( new @@ -1657,19 +1692,23 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con modelBuilder.Entity( b => { - b.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); - ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); - })); - b.OwnsOne( - e => e.Throned, b => - { - b.ToTable(tb => tb.IsTemporal(ttb => + b.ToTable( + tb => tb.IsTemporal( + ttb => { ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); })); + b.OwnsOne( + e => e.Throned, b => + { + b.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("PeriodStart").HasColumnName("PeriodStart"); + ttb.HasPeriodEnd("PeriodEnd").HasColumnName("PeriodEnd"); + })); b.HasData( new { @@ -1755,17 +1794,17 @@ protected override void Seed(PoolableDbContext context) context.SaveChanges(); var tableNames = new List - { - nameof(Barton), - nameof(Element), - nameof(Fink), - nameof(Moon), - nameof(Order), - nameof(OrderDetail), - nameof(OwnedPerson), - nameof(Planet), - nameof(Star), - }; + { + nameof(Barton), + nameof(Element), + nameof(Fink), + nameof(Moon), + nameof(Order), + nameof(OrderDetail), + nameof(OwnedPerson), + nameof(Planet), + nameof(Star), + }; foreach (var tableName in tableNames) { @@ -1776,7 +1815,8 @@ protected override void Seed(PoolableDbContext context) context.Database.ExecuteSqlRaw($"UPDATE [{tableName + "History"}] SET PeriodEnd = '2020-07-01T07:00:00.0000000Z'"); context.Database.ExecuteSqlRaw($"ALTER TABLE [{tableName}] ADD PERIOD FOR SYSTEM_TIME ([PeriodStart], [PeriodEnd])"); - context.Database.ExecuteSqlRaw($"ALTER TABLE [{tableName}] SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].[{tableName + "History"}]))"); + context.Database.ExecuteSqlRaw( + $"ALTER TABLE [{tableName}] SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].[{tableName + "History"}]))"); } } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalTableSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalTableSqlServerTest.cs index c0beccf57f8..0fc5b92ccae 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalTableSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalTableSqlServerTest.cs @@ -9,14 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Query; [SqlServerCondition(SqlServerCondition.SupportsTemporalTablesCascadeDelete)] public class TemporalTableSqlServerTest : NonSharedModelTestBase { - protected override string StoreName => "TemporalTableSqlServerTest"; + protected override string StoreName + => "TemporalTableSqlServerTest"; protected TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; - protected override ITestStoreFactory TestStoreFactory => SqlServerTestStoreFactory.Instance; + protected override ITestStoreFactory TestStoreFactory + => SqlServerTestStoreFactory.Instance; - protected void AssertSql(params string[] expected) => TestSqlLoggerFactory.AssertBaseline(expected); + protected void AssertSql(params string[] expected) + => TestSqlLoggerFactory.AssertBaseline(expected); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] @@ -126,10 +129,10 @@ public virtual async Task Temporal_owned_subquery(bool async) var date = new DateTime(2000, 1, 1); var query = context.MainEntitiesDifferentTable - .TemporalAsOf(date) - .Distinct() - .OrderByDescending(x => x.Id) - .Take(3); + .TemporalAsOf(date) + .Distinct() + .OrderByDescending(x => x.Id) + .Take(3); var _ = async ? await query.ToListAsync() : query.ToList(); } @@ -367,57 +370,72 @@ public MyContext26451(DbContextOptions options) protected override void OnModelCreating(ModelBuilder modelBuilder) { - modelBuilder.Entity().ToTable("MainEntityDifferentTable", tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("StartTime"); - ttb.HasPeriodEnd("EndTime"); - ttb.UseHistoryTable("ConfHistory"); - })); + modelBuilder.Entity().ToTable( + "MainEntityDifferentTable", tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("StartTime"); + ttb.HasPeriodEnd("EndTime"); + ttb.UseHistoryTable("ConfHistory"); + })); modelBuilder.Entity().Property(me => me.Id).UseIdentityColumn(); modelBuilder.Entity().OwnsOne(me => me.OwnedEntity).WithOwner(); - modelBuilder.Entity().OwnsOne(me => me.OwnedEntity, oe => - { - oe.ToTable("OwnedEntityDifferentTable", tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("StartTime"); - ttb.HasPeriodEnd("EndTime"); - ttb.UseHistoryTable("OwnedEntityHistory"); - })); - }); - - modelBuilder.Entity(eb => - { - eb.ToTable(tb => tb.IsTemporal(ttb => + modelBuilder.Entity().OwnsOne( + me => me.OwnedEntity, oe => { - ttb.HasPeriodStart("StartTime").HasColumnName("StartTime"); - ttb.HasPeriodEnd("EndTime").HasColumnName("EndTime"); - })); + oe.ToTable( + "OwnedEntityDifferentTable", tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("StartTime"); + ttb.HasPeriodEnd("EndTime"); + ttb.UseHistoryTable("OwnedEntityHistory"); + })); + }); - eb.OwnsOne(x => x.OwnedEntity, oeb => + modelBuilder.Entity( + eb => { - oeb.WithOwner(); - oeb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("StartTime").HasColumnName("StartTime"); - ttb.HasPeriodEnd("EndTime").HasColumnName("EndTime"); - })); - oeb.OwnsOne(x => x.Nested, neb => - { - neb.WithOwner(); - neb.ToTable(tb => tb.IsTemporal(ttb => + eb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("StartTime").HasColumnName("StartTime"); + ttb.HasPeriodEnd("EndTime").HasColumnName("EndTime"); + })); + + eb.OwnsOne( + x => x.OwnedEntity, oeb => { - ttb.HasPeriodStart("StartTime").HasColumnName("StartTime"); - ttb.HasPeriodEnd("EndTime").HasColumnName("EndTime"); - })); - }); + oeb.WithOwner(); + oeb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("StartTime").HasColumnName("StartTime"); + ttb.HasPeriodEnd("EndTime").HasColumnName("EndTime"); + })); + oeb.OwnsOne( + x => x.Nested, neb => + { + neb.WithOwner(); + neb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("StartTime").HasColumnName("StartTime"); + ttb.HasPeriodEnd("EndTime").HasColumnName("EndTime"); + })); + }); + }); }); - }); - modelBuilder.Entity(eb => - { - eb.ToTable(tb => tb.IsTemporal()); - eb.OwnsMany(x => x.OwnedCollection, oeb => oeb.ToTable(tb => tb.IsTemporal())); - }); + modelBuilder.Entity( + eb => + { + eb.ToTable(tb => tb.IsTemporal()); + eb.OwnsMany(x => x.OwnedCollection, oeb => oeb.ToTable(tb => tb.IsTemporal())); + }); } } @@ -438,22 +456,23 @@ public virtual async Task Temporal_can_query_shared_derived_hierarchy(bool async } protected Task> InitializeAsync( - Action onModelCreating, bool seed = true) - { - return InitializeAsync( + Action onModelCreating, + bool seed = true) + => InitializeAsync( onModelCreating, shouldLogCategory: _ => true, seed: seed ? c => c.Seed() : null); - } protected virtual void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity( eb => { - eb.ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("Start").HasColumnName("Start"); - ttb.HasPeriodEnd("End").HasColumnName("End"); - })); + eb.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasColumnName("Start"); + ttb.HasPeriodEnd("End").HasColumnName("End"); + })); eb.HasDiscriminator("Discriminator"); eb.Property("Discriminator").HasColumnName("Discriminator"); eb.ToTable("Vehicles"); @@ -462,28 +481,36 @@ protected virtual void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(); modelBuilder.Entity() - .ToTable("Vehicles", tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("Start").HasColumnName("Start"); - ttb.HasPeriodEnd("End").HasColumnName("End"); - })); + .ToTable( + "Vehicles", tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasColumnName("Start"); + ttb.HasPeriodEnd("End").HasColumnName("End"); + })); - modelBuilder.Entity().ToTable("Vehicles", tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("Start").HasColumnName("Start"); - ttb.HasPeriodEnd("End").HasColumnName("End"); - })); + modelBuilder.Entity().ToTable( + "Vehicles", tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasColumnName("Start"); + ttb.HasPeriodEnd("End").HasColumnName("End"); + })); - modelBuilder.Entity().ToTable("Vehicles", tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("Start").HasColumnName("Start"); - ttb.HasPeriodEnd("End").HasColumnName("End"); - })); + modelBuilder.Entity().ToTable( + "Vehicles", tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasColumnName("Start"); + ttb.HasPeriodEnd("End").HasColumnName("End"); + })); - modelBuilder.Entity().ToTable("Vehicles", tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("Start").HasColumnName("Start"); - ttb.HasPeriodEnd("End").HasColumnName("End"); - })); + modelBuilder.Entity().ToTable( + "Vehicles", tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasColumnName("Start"); + ttb.HasPeriodEnd("End").HasColumnName("End"); + })); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/SqlServerDatabaseModelFactoryTest.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/SqlServerDatabaseModelFactoryTest.cs index 3c8a04f7f5a..ed735bcb305 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/SqlServerDatabaseModelFactoryTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/SqlServerDatabaseModelFactoryTest.cs @@ -885,7 +885,8 @@ FOREIGN KEY (Id) REFERENCES PrincipalTable(Id) ON DELETE NO ACTION, [ConditionalFact] public void Triggers() => Test( - new[] { + new[] + { @" CREATE TABLE SomeTable ( Id int IDENTITY PRIMARY KEY, @@ -906,7 +907,8 @@ ON SomeTable AFTER INSERT AS BEGIN UPDATE SomeTable SET Baz=Foo WHERE Id IN (SELECT INSERTED.Id FROM INSERTED); -END;" }, +END;" + }, Enumerable.Empty(), Enumerable.Empty(), dbModel => @@ -914,10 +916,10 @@ AFTER INSERT AS var table = dbModel.Tables.Single(); var triggers = table.Triggers; - Assert.Collection(triggers.OrderBy(t => t.Name), + Assert.Collection( + triggers.OrderBy(t => t.Name), t => Assert.Equal("Trigger1", t.Name), t => Assert.Equal("Trigger2", t.Name)); - }, "DROP TABLE SomeTable;"); @@ -2387,8 +2389,7 @@ CONSTRAINT MYFK3 FOREIGN KEY (ForeignKeyId) REFERENCES OtherPrincipalTable(Id), [ConditionalFact] public void No_warning_missing_view_definition() - { - Test( + => Test( @"CREATE TABLE TestViewDefinition ( Id int PRIMARY KEY, );", @@ -2397,16 +2398,17 @@ public void No_warning_missing_view_definition() dbModel => { var message = Fixture.OperationReporter.Messages - .SingleOrDefault(m => m.Message == SqlServerResources.LogMissingViewDefinitionRights(new TestLogger()) - .GenerateMessage()).Message; + .SingleOrDefault( + m => m.Message + == SqlServerResources.LogMissingViewDefinitionRights(new TestLogger()) + .GenerateMessage()).Message; Assert.Null(message); }, @" DROP TABLE TestViewDefinition;"); - } - #endregion + #endregion private void Test( string? createSql, diff --git a/test/EFCore.SqlServer.FunctionalTests/SequenceEndToEndTest.cs b/test/EFCore.SqlServer.FunctionalTests/SequenceEndToEndTest.cs index a19e4901aaf..04360f8463c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/SequenceEndToEndTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/SequenceEndToEndTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class SequenceEndToEndTest : IDisposable diff --git a/test/EFCore.SqlServer.FunctionalTests/SequentialGuidEndToEndTest.cs b/test/EFCore.SqlServer.FunctionalTests/SequentialGuidEndToEndTest.cs index e9d52f05cc6..cca3b22e369 100644 --- a/test/EFCore.SqlServer.FunctionalTests/SequentialGuidEndToEndTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/SequentialGuidEndToEndTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class SequentialGuidEndToEndTest : IDisposable diff --git a/test/EFCore.SqlServer.FunctionalTests/SqlServerConfigPatternsTest.cs b/test/EFCore.SqlServer.FunctionalTests/SqlServerConfigPatternsTest.cs index 7e654834301..6e6d5853617 100644 --- a/test/EFCore.SqlServer.FunctionalTests/SqlServerConfigPatternsTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/SqlServerConfigPatternsTest.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming // ReSharper disable UnusedAutoPropertyAccessor.Local + #pragma warning disable RCS1102 // Make class static. namespace Microsoft.EntityFrameworkCore; diff --git a/test/EFCore.SqlServer.FunctionalTests/SqlServerQueryTriggersTest.cs b/test/EFCore.SqlServer.FunctionalTests/SqlServerQueryTriggersTest.cs index 71147c1bf7a..496c9ebacc6 100644 --- a/test/EFCore.SqlServer.FunctionalTests/SqlServerQueryTriggersTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/SqlServerQueryTriggersTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class SqlServerQueryTriggersTest : IClassFixture diff --git a/test/EFCore.SqlServer.FunctionalTests/SqlServerTriggersTest.cs b/test/EFCore.SqlServer.FunctionalTests/SqlServerTriggersTest.cs index 17fc19a4dcc..f5b8a01e0ab 100644 --- a/test/EFCore.SqlServer.FunctionalTests/SqlServerTriggersTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/SqlServerTriggersTest.cs @@ -3,6 +3,7 @@ // ReSharper disable ParameterOnlyUsedForPreconditionCheck.Local // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class SqlServerTriggersTest : IClassFixture @@ -107,12 +108,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity( eb => { - eb.ToTable(tb => - { - tb.HasTrigger("TRG_InsertProduct"); - tb.HasTrigger("TRG_UpdateProduct"); - tb.HasTrigger("TRG_DeleteProduct"); - }); + eb.ToTable( + tb => + { + tb.HasTrigger("TRG_InsertProduct"); + tb.HasTrigger("TRG_UpdateProduct"); + tb.HasTrigger("TRG_DeleteProduct"); + }); eb.Property(e => e.Version) .ValueGeneratedOnAddOrUpdate() .IsConcurrencyToken(); diff --git a/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedFixupSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedFixupSqlServerTest.cs index c44e083014f..8d35c54d4e7 100644 --- a/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedFixupSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedFixupSqlServerTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class StoreGeneratedFixupSqlServerTest : StoreGeneratedFixupRelationalTestBase< diff --git a/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedSqlServerTest.cs index fbfaf41ab6e..7512cb4947f 100644 --- a/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/StoreGeneratedSqlServerTest.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; // ReSharper disable InconsistentNaming @@ -37,7 +36,7 @@ public WrappedIntHiLoClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value.Equals(v2.Value)), v => v != null ? v.Value : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedIntHiLoClass { Value = v.Value }) { } } @@ -120,7 +119,7 @@ public WrappedIntHiLoKeyClassComparer() : base( (v1, v2) => (v1 == null && v2 == null) || (v1 != null && v2 != null && v1.Value.Equals(v2.Value)), v => v != null ? v.Value : 0, - v => v == null ? null : new() { Value = v.Value }) + v => v == null ? null : new WrappedIntHiLoKeyClass { Value = v.Value }) { } } @@ -171,8 +170,12 @@ protected class WrappedIntHiLoClassPrincipal { public WrappedIntHiLoKeyClass Id { get; set; } = null!; public ICollection Dependents { get; } = new List(); - public ICollection RequiredDependents { get; } = new List(); - public ICollection OptionalDependents { get; } = new List(); + + public ICollection RequiredDependents { get; } = + new List(); + + public ICollection OptionalDependents { get; } = + new List(); } protected class WrappedIntHiLoClassDependentShadow @@ -199,8 +202,12 @@ protected class WrappedIntHiLoStructPrincipal { public WrappedIntHiLoKeyStruct Id { get; set; } public ICollection Dependents { get; } = new List(); - public ICollection OptionalDependents { get; } = new List(); - public ICollection RequiredDependents { get; } = new List(); + + public ICollection OptionalDependents { get; } = + new List(); + + public ICollection RequiredDependents { get; } = + new List(); } protected class WrappedIntHiLoStructDependentShadow @@ -227,8 +234,12 @@ protected class WrappedIntHiLoRecordPrincipal { public WrappedIntHiLoKeyRecord Id { get; set; } = null!; public ICollection Dependents { get; } = new List(); - public ICollection OptionalDependents { get; } = new List(); - public ICollection RequiredDependents { get; } = new List(); + + public ICollection OptionalDependents { get; } = + new List(); + + public ICollection RequiredDependents { get; } = + new List(); } protected class WrappedIntHiLoRecordDependentShadow @@ -263,25 +274,37 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key_using_hi_lo() var principal1 = context.Add( new WrappedIntHiLoClassPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedIntHiLoClassDependentShadow(), new WrappedIntHiLoClassDependentShadow() }, + OptionalDependents = { new WrappedIntHiLoClassDependentOptional(), new WrappedIntHiLoClassDependentOptional() }, + RequiredDependents = { new WrappedIntHiLoClassDependentRequired(), new WrappedIntHiLoClassDependentRequired() } }).Entity; var principal2 = context.Add( new WrappedIntHiLoStructPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedIntHiLoStructDependentShadow(), new WrappedIntHiLoStructDependentShadow() }, + OptionalDependents = + { + new WrappedIntHiLoStructDependentOptional(), new WrappedIntHiLoStructDependentOptional() + }, + RequiredDependents = + { + new WrappedIntHiLoStructDependentRequired(), new WrappedIntHiLoStructDependentRequired() + } }).Entity; var principal3 = context.Add( new WrappedIntHiLoRecordPrincipal { - Dependents = { new(), new() }, - OptionalDependents = { new(), new() }, - RequiredDependents = { new(), new() } + Dependents = { new WrappedIntHiLoRecordDependentShadow(), new WrappedIntHiLoRecordDependentShadow() }, + OptionalDependents = + { + new WrappedIntHiLoRecordDependentOptional(), new WrappedIntHiLoRecordDependentOptional() + }, + RequiredDependents = + { + new WrappedIntHiLoRecordDependentRequired(), new WrappedIntHiLoRecordDependentRequired() + } }).Entity; context.SaveChanges(); @@ -294,12 +317,14 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key_using_hi_lo() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.NotEqual(0, dependent.Id.Value); Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.NotEqual(0, dependent.Id.Value); @@ -315,12 +340,14 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key_using_hi_lo() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.NotEqual(0, dependent.Id.Value); Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.NotEqual(0, dependent.Id.Value); @@ -336,12 +363,14 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key_using_hi_lo() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.NotEqual(0, dependent.Id.Value); Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.NotEqual(0, dependent.Id.Value); @@ -363,11 +392,13 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key_using_hi_lo() Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal1.OptionalDependents) { Assert.Same(principal1, dependent.Principal); Assert.Equal(id1, dependent.PrincipalId!.Value); } + foreach (var dependent in principal1.RequiredDependents) { Assert.Same(principal1, dependent.Principal); @@ -386,11 +417,13 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key_using_hi_lo() Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value.Value); } + foreach (var dependent in principal2.OptionalDependents) { Assert.Same(principal2, dependent.Principal); Assert.Equal(id2, dependent.PrincipalId!.Value.Value); } + foreach (var dependent in principal2.RequiredDependents) { Assert.Same(principal2, dependent.Principal); @@ -409,11 +442,13 @@ public virtual void Insert_update_and_delete_with_wrapped_int_key_using_hi_lo() Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, context.Entry(dependent).Property("PrincipalId").CurrentValue!.Value); } + foreach (var dependent in principal3.OptionalDependents) { Assert.Same(principal3, dependent.Principal); Assert.Equal(id3, dependent.PrincipalId!.Value); } + foreach (var dependent in principal3.RequiredDependents) { Assert.Same(principal3, dependent.Principal); @@ -739,8 +774,10 @@ protected override void ConfigureConventions(ModelConfigurationBuilder configura { base.ConfigureConventions(configurationBuilder); - configurationBuilder.Properties().HaveConversion(); - configurationBuilder.Properties().HaveConversion(); + configurationBuilder.Properties() + .HaveConversion(); + configurationBuilder.Properties() + .HaveConversion(); configurationBuilder.Properties().HaveConversion(); configurationBuilder.Properties().HaveConversion(); configurationBuilder.Properties().HaveConversion(); diff --git a/test/EFCore.SqlServer.FunctionalTests/TPTTableSplittingSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/TPTTableSplittingSqlServerTest.cs index 7894722ffad..3d9c3d35947 100644 --- a/test/EFCore.SqlServer.FunctionalTests/TPTTableSplittingSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/TPTTableSplittingSqlServerTest.cs @@ -144,8 +144,8 @@ INSERT INTO [LicensedOperators] ([VehicleName], [LicenseType]) UPDATE [Vehicles] SET [Operator_Name] = @p2 OUTPUT 1 WHERE [Name] = @p3;", - // - @"SELECT TOP(2) [v].[Name], [v].[SeatingCapacity], [c].[AttachedVehicleName], CASE + // + @"SELECT TOP(2) [v].[Name], [v].[SeatingCapacity], [c].[AttachedVehicleName], CASE WHEN [c].[Name] IS NOT NULL THEN N'CompositeVehicle' WHEN [p].[Name] IS NOT NULL THEN N'PoweredVehicle' END AS [Discriminator], [t].[Name], [t].[Operator_Name], [t].[LicenseType], [t].[Discriminator] @@ -175,8 +175,8 @@ public override async Task Can_change_principal_instance_non_derived() UPDATE [Vehicles] SET [SeatingCapacity] = @p0 OUTPUT 1 WHERE [Name] = @p1;", - // - @"SELECT TOP(2) [v].[Name], [v].[SeatingCapacity], [c].[AttachedVehicleName], CASE + // + @"SELECT TOP(2) [v].[Name], [v].[SeatingCapacity], [c].[AttachedVehicleName], CASE WHEN [c].[Name] IS NOT NULL THEN N'CompositeVehicle' WHEN [p].[Name] IS NOT NULL THEN N'PoweredVehicle' END AS [Discriminator], [t].[Name], [t].[Operator_Name], [t].[LicenseType], [t].[Discriminator] diff --git a/test/EFCore.SqlServer.FunctionalTests/TableSplittingSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/TableSplittingSqlServerTest.cs index 0a4d1d9fcdc..15644cf86a4 100644 --- a/test/EFCore.SqlServer.FunctionalTests/TableSplittingSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/TableSplittingSqlServerTest.cs @@ -116,8 +116,8 @@ public override async Task Can_change_dependent_instance_non_derived() UPDATE [Vehicles] SET [Operator_Discriminator] = @p0, [LicenseType] = @p1, [Operator_Name] = @p2 OUTPUT 1 WHERE [Name] = @p3;", - // - @"SELECT TOP(2) [v].[Name], [v].[Discriminator], [v].[SeatingCapacity], [v].[AttachedVehicleName], [v0].[Name], [v0].[Operator_Discriminator], [v0].[Operator_Name], [v0].[LicenseType] + // + @"SELECT TOP(2) [v].[Name], [v].[Discriminator], [v].[SeatingCapacity], [v].[AttachedVehicleName], [v0].[Name], [v0].[Operator_Discriminator], [v0].[Operator_Name], [v0].[LicenseType] FROM [Vehicles] AS [v] LEFT JOIN [Vehicles] AS [v0] ON [v].[Name] = [v0].[Name] WHERE [v].[Name] = N'Trek Pro Fit Madone 6 Series'"); @@ -136,8 +136,8 @@ public override async Task Can_change_principal_instance_non_derived() UPDATE [Vehicles] SET [SeatingCapacity] = @p0 OUTPUT 1 WHERE [Name] = @p1;", - // - @"SELECT TOP(2) [v].[Name], [v].[Discriminator], [v].[SeatingCapacity], [v].[AttachedVehicleName], [v0].[Name], [v0].[Operator_Discriminator], [v0].[Operator_Name], [v0].[LicenseType] + // + @"SELECT TOP(2) [v].[Name], [v].[Discriminator], [v].[SeatingCapacity], [v].[AttachedVehicleName], [v0].[Name], [v0].[Operator_Discriminator], [v0].[Operator_Name], [v0].[LicenseType] FROM [Vehicles] AS [v] LEFT JOIN [Vehicles] AS [v0] ON [v].[Name] = [v0].[Name] WHERE [v].[Name] = N'Trek Pro Fit Madone 6 Series'"); @@ -170,8 +170,8 @@ public override async Task ExecuteUpdate_works_for_table_sharing(bool async) @"UPDATE [v] SET [v].[SeatingCapacity] = 1 FROM [Vehicles] AS [v]", - // - @"SELECT CASE + // + @"SELECT CASE WHEN NOT EXISTS ( SELECT 1 FROM [Vehicles] AS [v] diff --git a/test/EFCore.SqlServer.FunctionalTests/TestUtilities/SqlServerTestStore.cs b/test/EFCore.SqlServer.FunctionalTests/TestUtilities/SqlServerTestStore.cs index dfa585b22f7..627568331c0 100644 --- a/test/EFCore.SqlServer.FunctionalTests/TestUtilities/SqlServerTestStore.cs +++ b/test/EFCore.SqlServer.FunctionalTests/TestUtilities/SqlServerTestStore.cs @@ -150,8 +150,7 @@ public override void Clean(DbContext context) => context.Database.EnsureClean(); public void ExecuteScript(string script) - { - Execute( + => Execute( Connection, command => { foreach (var batch in @@ -164,7 +163,6 @@ public void ExecuteScript(string script) return 0; }, ""); - } private static void WaitForExists(SqlConnection connection) => new TestSqlServerRetryingExecutionStrategy().Execute(connection, WaitForExistsImplementation); diff --git a/test/EFCore.SqlServer.FunctionalTests/TransactionSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/TransactionSqlServerTest.cs index b0f1d5cb2a7..81104100421 100644 --- a/test/EFCore.SqlServer.FunctionalTests/TransactionSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/TransactionSqlServerTest.cs @@ -27,7 +27,8 @@ public override Task Savepoint_can_be_released(bool async) // Test relies on savepoints, which are disabled when MARS is enabled public override Task SaveChanges_uses_explicit_transaction_with_failure_behavior( - bool async, AutoTransactionBehavior autoTransactionBehavior) + bool async, + AutoTransactionBehavior autoTransactionBehavior) => new SqlConnectionStringBuilder(TestStore.ConnectionString).MultipleActiveResultSets ? Task.CompletedTask : base.SaveChanges_uses_explicit_transaction_with_failure_behavior(async, autoTransactionBehavior); diff --git a/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs index b6a1130fdd1..7236f95f5fc 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs @@ -24,8 +24,8 @@ public override async Task Add_element_to_json_collection_branch() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedCollectionBranch', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -42,8 +42,8 @@ public override async Task Add_element_to_json_collection_leaf() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedReferenceBranch.OwnedCollectionLeaf', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -60,8 +60,8 @@ public override async Task Add_element_to_json_collection_on_derived() UPDATE [JsonEntitiesInheritance] SET [CollectionOnDerived] = @p0 OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[Discriminator], [j].[Name], [j].[Fraction], JSON_QUERY([j].[CollectionOnBase],'$'), JSON_QUERY([j].[ReferenceOnBase],'$'), JSON_QUERY([j].[CollectionOnDerived],'$'), JSON_QUERY([j].[ReferenceOnDerived],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[Discriminator], [j].[Name], [j].[Fraction], JSON_QUERY([j].[CollectionOnBase],'$'), JSON_QUERY([j].[ReferenceOnBase],'$'), JSON_QUERY([j].[CollectionOnDerived],'$'), JSON_QUERY([j].[ReferenceOnDerived],'$') FROM [JsonEntitiesInheritance] AS [j] WHERE [j].[Discriminator] = N'JsonEntityInheritanceDerived'"); } @@ -79,8 +79,8 @@ public override async Task Add_element_to_json_collection_root() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = @p0 OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -98,8 +98,8 @@ public override async Task Add_entity_with_json() SET NOCOUNT ON; INSERT INTO [JsonEntitiesBasic] ([OwnedReferenceRoot], [Id], [EntityBasicId], [Name]) VALUES (@p0, @p1, @p2, @p3);", - // - @"SELECT [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -116,8 +116,8 @@ public override async Task Add_json_reference_leaf() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedCollectionBranch[0].OwnedReferenceLeaf', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -134,8 +134,8 @@ public override async Task Add_json_reference_root() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = @p0 OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -151,8 +151,8 @@ public override async Task Delete_entity_with_json() DELETE FROM [JsonEntitiesBasic] OUTPUT 1 WHERE [Id] = @p0;", - // - @"SELECT COUNT(*) + // + @"SELECT COUNT(*) FROM [JsonEntitiesBasic] AS [j]"); } @@ -169,8 +169,8 @@ public override async Task Delete_json_collection_branch() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedCollectionBranch', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -187,8 +187,8 @@ public override async Task Delete_json_collection_root() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = @p0 OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -205,8 +205,8 @@ public override async Task Delete_json_reference_leaf() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedReferenceBranch.OwnedReferenceLeaf', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -223,8 +223,8 @@ public override async Task Delete_json_reference_root() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = @p0 OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -241,8 +241,8 @@ public override async Task Edit_element_in_json_collection_branch() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = JSON_MODIFY([OwnedCollectionRoot], 'strict $[0].OwnedCollectionBranch[0].Date', JSON_VALUE(@p0, '$[0]')) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -259,8 +259,8 @@ public override async Task Edit_element_in_json_collection_root1() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = JSON_MODIFY([OwnedCollectionRoot], 'strict $[0].Name', JSON_VALUE(@p0, '$[0]')) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -277,8 +277,8 @@ public override async Task Edit_element_in_json_collection_root2() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = JSON_MODIFY([OwnedCollectionRoot], 'strict $[1].Name', JSON_VALUE(@p0, '$[0]')) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -296,8 +296,8 @@ public override async Task Edit_element_in_json_multiple_levels_partial_update() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = JSON_MODIFY([OwnedCollectionRoot], 'strict $[0].OwnedCollectionBranch', JSON_QUERY(@p0)), [OwnedReferenceRoot] = @p1 OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -314,8 +314,8 @@ public override async Task Edit_element_in_json_branch_collection_and_add_elemen UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedCollectionBranch', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -332,8 +332,8 @@ public override async Task Edit_two_elements_in_the_same_json_collection() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedCollectionBranch[0].OwnedCollectionLeaf', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -350,8 +350,8 @@ public override async Task Edit_two_elements_in_the_same_json_collection_at_the_ UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = @p0 OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -368,8 +368,8 @@ public override async Task Edit_collection_element_and_reference_at_once() UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedCollectionBranch[1]', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -387,8 +387,8 @@ public override async Task Edit_single_enum_property() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = JSON_MODIFY([OwnedCollectionRoot], 'strict $[1].OwnedCollectionBranch[1].Enum', JSON_VALUE(@p0, '$[0]')), [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedReferenceBranch.Enum', JSON_VALUE(@p1, '$[0]')) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -406,8 +406,8 @@ public override async Task Edit_single_numeric_property() UPDATE [JsonEntitiesBasic] SET [OwnedCollectionRoot] = JSON_MODIFY([OwnedCollectionRoot], 'strict $[1].Number', CAST(JSON_VALUE(@p0, '$[0]') AS int)), [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.Number', CAST(JSON_VALUE(@p1, '$[0]') AS int)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -425,8 +425,8 @@ public override async Task Edit_single_property_bool() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestBoolean', CAST(JSON_VALUE(@p0, '$[0]') AS bit)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestBoolean', CAST(JSON_VALUE(@p1, '$[0]') AS bit)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -444,8 +444,8 @@ public override async Task Edit_single_property_byte() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestByte', CAST(JSON_VALUE(@p0, '$[0]') AS tinyint)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestByte', CAST(JSON_VALUE(@p1, '$[0]') AS tinyint)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -462,8 +462,8 @@ public override async Task Edit_single_property_char() UPDATE [JsonEntitiesAllTypes] SET [Reference] = JSON_MODIFY([Reference], 'strict $.TestCharacter', CAST(JSON_VALUE(@p0, '$[0]') AS nvarchar(1))) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -481,8 +481,8 @@ public override async Task Edit_single_property_datetime() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestDateTime', JSON_VALUE(@p0, '$[0]')), [Reference] = JSON_MODIFY([Reference], 'strict $.TestDateTime', JSON_VALUE(@p1, '$[0]')) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -500,8 +500,8 @@ public override async Task Edit_single_property_datetimeoffset() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestDateTimeOffset', JSON_VALUE(@p0, '$[0]')), [Reference] = JSON_MODIFY([Reference], 'strict $.TestDateTimeOffset', JSON_VALUE(@p1, '$[0]')) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -519,8 +519,8 @@ public override async Task Edit_single_property_decimal() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestDecimal', CAST(JSON_VALUE(@p0, '$[0]') AS decimal(18,3))), [Reference] = JSON_MODIFY([Reference], 'strict $.TestDecimal', CAST(JSON_VALUE(@p1, '$[0]') AS decimal(18,3))) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -538,8 +538,8 @@ public override async Task Edit_single_property_double() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestDouble', CAST(JSON_VALUE(@p0, '$[0]') AS float)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestDouble', CAST(JSON_VALUE(@p1, '$[0]') AS float)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -557,8 +557,8 @@ public override async Task Edit_single_property_guid() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestGuid', JSON_VALUE(@p0, '$[0]')), [Reference] = JSON_MODIFY([Reference], 'strict $.TestGuid', JSON_VALUE(@p1, '$[0]')) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -576,8 +576,8 @@ public override async Task Edit_single_property_int16() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestInt16', CAST(JSON_VALUE(@p0, '$[0]') AS smallint)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestInt16', CAST(JSON_VALUE(@p1, '$[0]') AS smallint)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -595,8 +595,8 @@ public override async Task Edit_single_property_int32() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestInt32', CAST(JSON_VALUE(@p0, '$[0]') AS int)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestInt32', CAST(JSON_VALUE(@p1, '$[0]') AS int)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -614,8 +614,8 @@ public override async Task Edit_single_property_int64() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestInt64', CAST(JSON_VALUE(@p0, '$[0]') AS bigint)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestInt64', CAST(JSON_VALUE(@p1, '$[0]') AS bigint)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -633,8 +633,8 @@ public override async Task Edit_single_property_signed_byte() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestSignedByte', CAST(JSON_VALUE(@p0, '$[0]') AS smallint)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestSignedByte', CAST(JSON_VALUE(@p1, '$[0]') AS smallint)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -652,8 +652,8 @@ public override async Task Edit_single_property_single() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestSingle', CAST(JSON_VALUE(@p0, '$[0]') AS real)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestSingle', CAST(JSON_VALUE(@p1, '$[0]') AS real)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -671,8 +671,8 @@ public override async Task Edit_single_property_timespan() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestTimeSpan', JSON_VALUE(@p0, '$[0]')), [Reference] = JSON_MODIFY([Reference], 'strict $.TestTimeSpan', JSON_VALUE(@p1, '$[0]')) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -690,8 +690,8 @@ public override async Task Edit_single_property_uint16() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestUnsignedInt16', CAST(JSON_VALUE(@p0, '$[0]') AS int)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestUnsignedInt16', CAST(JSON_VALUE(@p1, '$[0]') AS int)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -709,8 +709,8 @@ public override async Task Edit_single_property_uint32() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestUnsignedInt32', CAST(JSON_VALUE(@p0, '$[0]') AS bigint)), [Reference] = JSON_MODIFY([Reference], 'strict $.TestUnsignedInt32', CAST(JSON_VALUE(@p1, '$[0]') AS bigint)) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -728,8 +728,8 @@ public override async Task Edit_single_property_uint64() UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0].TestUnsignedInt64', CAST(JSON_VALUE(@p0, '$[0]') AS decimal(20,0))), [Reference] = JSON_MODIFY([Reference], 'strict $.TestUnsignedInt64', CAST(JSON_VALUE(@p1, '$[0]') AS decimal(20,0))) OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -747,8 +747,8 @@ public override async Task Edit_two_properties_on_same_entity_updates_the_entire UPDATE [JsonEntitiesAllTypes] SET [Collection] = JSON_MODIFY([Collection], 'strict $[0]', JSON_QUERY(@p0)), [Reference] = @p1 OUTPUT 1 WHERE [Id] = @p2;", - // - @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') + // + @"SELECT TOP(2) [j].[Id], JSON_QUERY([j].[Collection],'$'), JSON_QUERY([j].[Reference],'$') FROM [JsonEntitiesAllTypes] AS [j]"); } @@ -765,8 +765,8 @@ public override async Task Edit_a_scalar_property_and_reference_navigation_on_th UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedReferenceBranch', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -783,8 +783,8 @@ public override async Task Edit_a_scalar_property_and_collection_navigation_on_t UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedReferenceBranch', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } @@ -801,12 +801,13 @@ public override async Task Edit_a_scalar_property_and_another_property_behind_re UPDATE [JsonEntitiesBasic] SET [OwnedReferenceRoot] = JSON_MODIFY([OwnedReferenceRoot], 'strict $.OwnedReferenceBranch', JSON_QUERY(@p0)) OUTPUT 1 WHERE [Id] = @p1;", - // - @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') + // + @"SELECT TOP(2) [j].[Id], [j].[EntityBasicId], [j].[Name], JSON_QUERY([j].[OwnedCollectionRoot],'$'), JSON_QUERY([j].[OwnedReferenceRoot],'$') FROM [JsonEntitiesBasic] AS [j]"); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.SqlServer.FunctionalTests/Update/SqlServerUpdateSqlGeneratorTest.cs b/test/EFCore.SqlServer.FunctionalTests/Update/SqlServerUpdateSqlGeneratorTest.cs index 378233eb524..b591c7147d8 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Update/SqlServerUpdateSqlGeneratorTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Update/SqlServerUpdateSqlGeneratorTest.cs @@ -196,7 +196,8 @@ OUTPUT 1 ", stringBuilder.ToString()); - protected override void AppendDeleteOperation_creates_full_delete_command_text_with_concurrency_check_verification(StringBuilder stringBuilder) + protected override void AppendDeleteOperation_creates_full_delete_command_text_with_concurrency_check_verification( + StringBuilder stringBuilder) => AssertBaseline( @"DELETE FROM [dbo].[Ducks] OUTPUT 1 diff --git a/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceSqlServerTest.cs index 0d8f01e9654..cd55de03c4b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceSqlServerTest.cs @@ -318,8 +318,8 @@ OUTPUT INSERTED.[Data1] public override async Task Modify_Modify_with_different_entity_types_and_no_generated_values(bool async) { await base.Modify_Modify_with_different_entity_types_and_no_generated_values(async); -AssertSql( - @"@p2='1' + AssertSql( + @"@p2='1' @p0='1000' @p1='1000' @p5='2' diff --git a/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceTriggerSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceTriggerSqlServerTest.cs index c6e157793b7..a6b740a1571 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceTriggerSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Update/StoreValueGenerationSequenceTriggerSqlServerTest.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Data.SqlClient; -using Microsoft.EntityFrameworkCore.SqlServer.Internal; using Microsoft.EntityFrameworkCore.TestModels.StoreValueGenerationModel; namespace Microsoft.EntityFrameworkCore.Update; diff --git a/test/EFCore.SqlServer.FunctionalTests/Update/StoredProcedureUpdateSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Update/StoredProcedureUpdateSqlServerTest.cs index 6dfd279bc28..4a67e71ef99 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Update/StoredProcedureUpdateSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Update/StoredProcedureUpdateSqlServerTest.cs @@ -442,7 +442,7 @@ public override void CleanData() DELETE FROM [TptParent]; DBCC CHECKIDENT ('[TptParent]', RESEED, 0);"; - class StoredProcedureTestStoryFactory : SqlServerTestStoreFactory + private class StoredProcedureTestStoryFactory : SqlServerTestStoreFactory { public static new StoredProcedureTestStoryFactory Instance { get; } = new(); diff --git a/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPCTest.cs b/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPCTest.cs index 9a67808acac..6399f49091f 100644 --- a/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPCTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPCTest.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore.TestModels.UpdatesModel; using static Microsoft.EntityFrameworkCore.UpdatesSqlServerTPCTest; @@ -9,7 +8,7 @@ namespace Microsoft.EntityFrameworkCore; -public class UpdatesSqlServerTPCTest : UpdatesRelationalTestBase +public class UpdatesSqlServerTPCTest : UpdatesRelationalTestBase { // ReSharper disable once UnusedParameter.Local public UpdatesSqlServerTPCTest(UpdatesSqlServerTPTFixture fixture, ITestOutputHelper testOutputHelper) @@ -50,7 +49,7 @@ public override void Can_add_and_remove_self_refs() base.Can_add_and_remove_self_refs(); AssertContainsSql( - @"@p0='1' (Nullable = false) (Size = 4000) + @"@p0='1' (Nullable = false) (Size = 4000) @p1=NULL (DbType = Int32) SET IMPLICIT_TRANSACTIONS OFF; @@ -58,8 +57,8 @@ public override void Can_add_and_remove_self_refs() INSERT INTO [Person] ([Name], [ParentId]) OUTPUT INSERTED.[PersonId] VALUES (@p0, @p1);", - // - @"@p2='2' (Nullable = false) (Size = 4000) + // + @"@p2='2' (Nullable = false) (Size = 4000) @p3='1' (Nullable = true) @p4='3' (Nullable = false) (Size = 4000) @p5='1' (Nullable = true) @@ -73,8 +72,8 @@ WHEN NOT MATCHED THEN INSERT ([Name], [ParentId]) VALUES (i.[Name], i.[ParentId]) OUTPUT INSERTED.[PersonId], i._Position;", - // - @"@p6='4' (Nullable = false) (Size = 4000) + // + @"@p6='4' (Nullable = false) (Size = 4000) @p7='2' (Nullable = true) @p8='5' (Nullable = false) (Size = 4000) @p9='2' (Nullable = true) @@ -206,9 +205,7 @@ public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder build }); protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) - { - configurationBuilder.Properties().HaveColumnType("decimal(18, 2)"); - } + => configurationBuilder.Properties().HaveColumnType("decimal(18, 2)"); protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { diff --git a/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPTTest.cs b/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPTTest.cs index bd8805e9a02..5eb72e81fd8 100644 --- a/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPTTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTPTTest.cs @@ -48,7 +48,7 @@ public override void Can_add_and_remove_self_refs() base.Can_add_and_remove_self_refs(); AssertContainsSql( - @"@p0='1' (Nullable = false) (Size = 4000) + @"@p0='1' (Nullable = false) (Size = 4000) @p1=NULL (DbType = Int32) SET IMPLICIT_TRANSACTIONS OFF; @@ -56,8 +56,8 @@ public override void Can_add_and_remove_self_refs() INSERT INTO [Person] ([Name], [ParentId]) OUTPUT INSERTED.[PersonId] VALUES (@p0, @p1);", - // - @"@p2='2' (Nullable = false) (Size = 4000) + // + @"@p2='2' (Nullable = false) (Size = 4000) @p3='1' (Nullable = true) @p4='3' (Nullable = false) (Size = 4000) @p5='1' (Nullable = true) @@ -71,8 +71,8 @@ WHEN NOT MATCHED THEN INSERT ([Name], [ParentId]) VALUES (i.[Name], i.[ParentId]) OUTPUT INSERTED.[PersonId], i._Position;", - // - @"@p6='4' (Nullable = false) (Size = 4000) + // + @"@p6='4' (Nullable = false) (Size = 4000) @p7='2' (Nullable = true) @p8='5' (Nullable = false) (Size = 4000) @p9='2' (Nullable = true) @@ -197,9 +197,7 @@ public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder build }); protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) - { - configurationBuilder.Properties().HaveColumnType("decimal(18, 2)"); - } + => configurationBuilder.Properties().HaveColumnType("decimal(18, 2)"); protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { diff --git a/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTest.cs index 83cf308403f..18153e9d7ab 100644 --- a/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/UpdatesSqlServerTest.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.EntityFrameworkCore.TestModels.UpdatesModel; - #nullable enable +using Microsoft.EntityFrameworkCore.TestModels.UpdatesModel; + namespace Microsoft.EntityFrameworkCore; public class UpdatesSqlServerTest : UpdatesRelationalTestBase @@ -49,7 +49,7 @@ public override void Can_add_and_remove_self_refs() base.Can_add_and_remove_self_refs(); AssertContainsSql( - @"@p0='1' (Nullable = false) (Size = 4000) + @"@p0='1' (Nullable = false) (Size = 4000) @p1=NULL (DbType = Int32) SET IMPLICIT_TRANSACTIONS OFF; @@ -57,8 +57,8 @@ public override void Can_add_and_remove_self_refs() INSERT INTO [Person] ([Name], [ParentId]) OUTPUT INSERTED.[PersonId] VALUES (@p0, @p1);", - // - @"@p2='2' (Nullable = false) (Size = 4000) + // + @"@p2='2' (Nullable = false) (Size = 4000) @p3='1' (Nullable = true) @p4='3' (Nullable = false) (Size = 4000) @p5='1' (Nullable = true) @@ -72,8 +72,8 @@ WHEN NOT MATCHED THEN INSERT ([Name], [ParentId]) VALUES (i.[Name], i.[ParentId]) OUTPUT INSERTED.[PersonId], i._Position;", - // - @"@p6='4' (Nullable = false) (Size = 4000) + // + @"@p6='4' (Nullable = false) (Size = 4000) @p7='2' (Nullable = true) @p8='5' (Nullable = false) (Size = 4000) @p9='2' (Nullable = true) @@ -189,9 +189,7 @@ public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder build }); protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) - { - configurationBuilder.Properties().HaveColumnType("decimal(18, 2)"); - } + => configurationBuilder.Properties().HaveColumnType("decimal(18, 2)"); protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { diff --git a/test/EFCore.SqlServer.Tests/Infrastructure/SqlServerModelValidatorTest.cs b/test/EFCore.SqlServer.Tests/Infrastructure/SqlServerModelValidatorTest.cs index 69139900baf..fd044c12987 100644 --- a/test/EFCore.SqlServer.Tests/Infrastructure/SqlServerModelValidatorTest.cs +++ b/test/EFCore.SqlServer.Tests/Infrastructure/SqlServerModelValidatorTest.cs @@ -824,8 +824,10 @@ public void Temporal_period_property_must_be_mapped_to_datetime2() public void Temporal_all_properties_mapped_to_period_column_must_have_value_generated_OnAddOrUpdate() { var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity().ToTable(tb => tb.IsTemporal(ttb => - ttb.HasPeriodStart("Start").HasColumnName("StartColumn").GetInfrastructure().ValueGeneratedNever())); + modelBuilder.Entity().ToTable( + tb => tb.IsTemporal( + ttb => + ttb.HasPeriodStart("Start").HasColumnName("StartColumn").GetInfrastructure().ValueGeneratedNever())); VerifyError( SqlServerStrings.TemporalPropertyMappedToPeriodColumnMustBeValueGeneratedOnAddOrUpdate( @@ -861,7 +863,9 @@ public void Temporal_doesnt_work_on_table_splitting_with_inconsistent_period_map modelBuilder.Entity().ToTable("Splitting", tb => tb.IsTemporal()); modelBuilder.Entity().HasOne(x => x.Details).WithOne().HasForeignKey(x => x.Id); - VerifyError(SqlServerStrings.TemporalNotSupportedForTableSplittingWithInconsistentPeriodMapping("start", "Splitting2", "PeriodStart", "Splitting2_PeriodStart", "PeriodStart"), modelBuilder); + VerifyError( + SqlServerStrings.TemporalNotSupportedForTableSplittingWithInconsistentPeriodMapping( + "start", "Splitting2", "PeriodStart", "Splitting2_PeriodStart", "PeriodStart"), modelBuilder); } [ConditionalFact] @@ -879,11 +883,13 @@ public void Temporal_doesnt_work_on_table_splitting_when_some_types_are_temporal public void Temporal_table_with_explicit_precision_on_period_columns_passes_validation() { var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity().ToTable(tb => tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("Start").HasPrecision(2); - ttb.HasPeriodEnd("End").HasPrecision(2); - })); + modelBuilder.Entity().ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasPrecision(2); + ttb.HasPeriodEnd("End").HasPrecision(2); + })); Validate(modelBuilder); @@ -897,20 +903,25 @@ public void Temporal_table_with_explicit_precision_on_period_columns_passes_vali public void Temporal_table_with_owned_with_explicit_precision_on_period_columns_passes_validation() { var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(b => - { - b.ToTable(tb => tb.IsTemporal(ttb => + modelBuilder.Entity( + b => { - ttb.HasPeriodStart("Start").HasColumnName("Start").HasPrecision(2); - ttb.HasPeriodEnd("End").HasColumnName("End").HasPrecision(2); - })); - b.OwnsOne(x => x.Owned).ToTable(tb => - tb.IsTemporal(ttb => - { - ttb.HasPeriodStart("Start").HasColumnName("Start").HasPrecision(2); - ttb.HasPeriodEnd("End").HasColumnName("End").HasPrecision(2); - })); - }); + b.ToTable( + tb => tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasColumnName("Start").HasPrecision(2); + ttb.HasPeriodEnd("End").HasColumnName("End").HasPrecision(2); + })); + b.OwnsOne(x => x.Owned).ToTable( + tb => + tb.IsTemporal( + ttb => + { + ttb.HasPeriodStart("Start").HasColumnName("Start").HasPrecision(2); + ttb.HasPeriodEnd("End").HasColumnName("End").HasPrecision(2); + })); + }); Validate(modelBuilder); diff --git a/test/EFCore.SqlServer.Tests/Metadata/SqlServerBuilderExtensionsTest.cs b/test/EFCore.SqlServer.Tests/Metadata/SqlServerBuilderExtensionsTest.cs index dbfb6aee0d0..b0a9f3e63a2 100644 --- a/test/EFCore.SqlServer.Tests/Metadata/SqlServerBuilderExtensionsTest.cs +++ b/test/EFCore.SqlServer.Tests/Metadata/SqlServerBuilderExtensionsTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Metadata; public class SqlServerBuilderExtensionsTest diff --git a/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerModelBuilderTestBase.cs b/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerModelBuilderTestBase.cs index acaf3dd2a51..be4c2623667 100644 --- a/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerModelBuilderTestBase.cs +++ b/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerModelBuilderTestBase.cs @@ -84,14 +84,16 @@ public void Indexes_can_have_same_name_across_tables() var customerIndex = model.FindEntityType(typeof(Customer))!.GetIndexes().Single(); Assert.Equal("Ix_Id", customerIndex.Name); Assert.Equal("Ix_Id", customerIndex.GetDatabaseName()); - Assert.Equal("Ix_Id", customerIndex.GetDatabaseName( - StoreObjectIdentifier.Table("Customer"))); + Assert.Equal( + "Ix_Id", customerIndex.GetDatabaseName( + StoreObjectIdentifier.Table("Customer"))); var detailsIndex = model.FindEntityType(typeof(CustomerDetails))!.GetIndexes().Single(); Assert.Equal("Ix_Id", detailsIndex.Name); Assert.Equal("Ix_Id", detailsIndex.GetDatabaseName()); - Assert.Equal("Ix_Id", detailsIndex.GetDatabaseName( - StoreObjectIdentifier.Table("CustomerDetails"))); + Assert.Equal( + "Ix_Id", detailsIndex.GetDatabaseName( + StoreObjectIdentifier.Table("CustomerDetails"))); } [ConditionalFact] @@ -413,9 +415,11 @@ public virtual void TPC_identifying_FKs_are_created_on_all_tables() var ingredientType = model.FindEntityType(typeof(Ingredient))!; var ingredientIndex = ingredientType.GetDeclaredIndexes().Single(); Assert.Equal("IX_Ingredients_BurgerId", ingredientIndex.GetDatabaseName()); - Assert.Equal("IX_SesameBuns_BurgerId", + Assert.Equal( + "IX_SesameBuns_BurgerId", ingredientIndex.GetDatabaseName(StoreObjectIdentifier.Create(sesameBunType, StoreObjectType.Table)!.Value)); - Assert.Equal("IX_Buns_BurgerId", + Assert.Equal( + "IX_Buns_BurgerId", ingredientIndex.GetDatabaseName(StoreObjectIdentifier.Create(bunType, StoreObjectType.Table)!.Value)); } @@ -456,11 +460,12 @@ public void Can_add_check_constraints() .HasBaseType(null) .ToTable(tb => tb.HasCheckConstraint("CK_ChildBase_LargeId", "Id > 1000").HasName("CK_LargeId")); modelBuilder.Entity() - .ToTable(tb => - { - tb.HasCheckConstraint("PositiveId", "Id > 0"); - tb.HasCheckConstraint("CK_ChildBase_LargeId", "Id > 1000"); - }); + .ToTable( + tb => + { + tb.HasCheckConstraint("PositiveId", "Id > 0"); + tb.HasCheckConstraint("CK_ChildBase_LargeId", "Id > 1000"); + }); modelBuilder.Entity() .HasBaseType(); modelBuilder.Entity(); @@ -586,7 +591,7 @@ protected abstract class EventBase protected class Activity { public string? Id { get; set; } - public virtual List> Events { get; private set; } = null!; + public virtual List> Events { get; } = null!; } protected class ActivityEvent : EventBase @@ -811,13 +816,14 @@ public virtual void Owned_types_can_be_mapped_to_different_tables() modelBuilder.Entity( bb => { - bb.ToTable("BT", "BS", t => - { - t.ExcludeFromMigrations(); + bb.ToTable( + "BT", "BS", t => + { + t.ExcludeFromMigrations(); - Assert.Equal("BT", t.Name); - Assert.Equal("BS", t.Schema); - }); + Assert.Equal("BT", t.Name); + Assert.Equal("BS", t.Schema); + }); bb.OwnsOne( b => b.AlternateLabel, tb => { @@ -829,13 +835,14 @@ public virtual void Owned_types_can_be_mapped_to_different_tables() l => l.AnotherBookLabel, ab => { ab.Ignore(l => l.Book); - ab.ToTable("AT1", "AS1", t => - { - t.ExcludeFromMigrations(false); - - Assert.Equal("AT1", t.Name); - Assert.Equal("AS1", t.Schema); - }); + ab.ToTable( + "AT1", "AS1", t => + { + t.ExcludeFromMigrations(false); + + Assert.Equal("AT1", t.Name); + Assert.Equal("AS1", t.Schema); + }); ab.OwnsOne(s => s.SpecialBookLabel) .ToTable("ST11", "SS11") .Ignore(l => l.Book) @@ -1074,13 +1081,13 @@ public virtual void Owner_can_be_mapped_to_a_view() var modelBuilder = CreateModelBuilder(); modelBuilder.Entity().OwnsMany( - c => c.Orders, - r => - { - r.HasKey(o => o.OrderId); - r.Ignore(o => o.OrderCombination); - r.Ignore(o => o.Details); - }) + c => c.Orders, + r => + { + r.HasKey(o => o.OrderId); + r.Ignore(o => o.OrderCombination); + r.Ignore(o => o.Details); + }) .ToView("bar", "foo"); var model = modelBuilder.FinalizeModel(); @@ -1115,8 +1122,9 @@ public override void Can_configure_owned_type() modelBuilder.Ignore(); var ownedBuilder = modelBuilder.Entity().OwnsOne(c => c.Details) - .ToTable("OtherCustomerDetails", tb => - tb.HasCheckConstraint("CK_CustomerDetails_T", "AlternateKey <> 0").HasName("CK_Guid")); + .ToTable( + "OtherCustomerDetails", tb => + tb.HasCheckConstraint("CK_CustomerDetails_T", "AlternateKey <> 0").HasName("CK_Guid")); ownedBuilder.Property(d => d.CustomerId); ownedBuilder.HasIndex(d => d.CustomerId); ownedBuilder.WithOwner(d => (OtherCustomer?)d.Customer) @@ -1125,8 +1133,9 @@ public override void Can_configure_owned_type() modelBuilder.Entity().OwnsOne( c => c.Details, b => { - b.ToTable("SpecialCustomerDetails", tb => - tb.HasCheckConstraint("CK_CustomerDetails_T", "AlternateKey <> 0").HasName("CK_Guid")); + b.ToTable( + "SpecialCustomerDetails", tb => + tb.HasCheckConstraint("CK_CustomerDetails_T", "AlternateKey <> 0").HasName("CK_Guid")); b.Property(d => d.CustomerId); b.HasIndex(d => d.CustomerId); b.WithOwner(d => (SpecialCustomer?)d.Customer) @@ -1195,12 +1204,13 @@ public virtual void Temporal_table_default_settings() var modelBuilder = CreateModelBuilder(); var model = modelBuilder.Model; - modelBuilder.Entity().ToTable(tb => - { - tb.IsTemporal(); - Assert.Null(tb.Name); - Assert.Null(tb.Schema); - }); + modelBuilder.Entity().ToTable( + tb => + { + tb.IsTemporal(); + Assert.Null(tb.Name); + Assert.Null(tb.Schema); + }); modelBuilder.FinalizeModel(); var entity = model.FindEntityType(typeof(Customer))!; @@ -1508,13 +1518,14 @@ public virtual void Json_entity_and_normal_owned_can_exist_side_by_side_on_same_ { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1); - b.OwnsOne(x => x.OwnedReference2, bb => bb.ToJson("reference")); - b.OwnsMany(x => x.OwnedCollection1); - b.OwnsMany(x => x.OwnedCollection2, bb => bb.ToJson("collection")); - }); + modelBuilder.Entity( + b => + { + b.OwnsOne(x => x.OwnedReference1); + b.OwnsOne(x => x.OwnedReference2, bb => bb.ToJson("reference")); + b.OwnsMany(x => x.OwnedCollection1); + b.OwnsMany(x => x.OwnedCollection2, bb => bb.ToJson("collection")); + }); var model = modelBuilder.FinalizeModel(); var owner = model.FindEntityType(typeof(JsonEntity))!; @@ -1546,18 +1557,20 @@ public virtual void Json_entity_with_tph_inheritance() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReferenceOnBase, bb => bb.ToJson("reference_on_base")); - b.OwnsMany(x => x.OwnedCollectionOnBase, bb => bb.ToJson("collection_on_base")); - }); + modelBuilder.Entity( + b => + { + b.OwnsOne(x => x.OwnedReferenceOnBase, bb => bb.ToJson("reference_on_base")); + b.OwnsMany(x => x.OwnedCollectionOnBase, bb => bb.ToJson("collection_on_base")); + }); - modelBuilder.Entity(b => - { - b.HasBaseType(); - b.OwnsOne(x => x.OwnedReferenceOnDerived, bb => bb.ToJson("reference_on_derived")); - b.OwnsMany(x => x.OwnedCollectionOnDerived, bb => bb.ToJson("collection_on_derived")); - }); + modelBuilder.Entity( + b => + { + b.HasBaseType(); + b.OwnsOne(x => x.OwnedReferenceOnDerived, bb => bb.ToJson("reference_on_derived")); + b.OwnsMany(x => x.OwnedCollectionOnDerived, bb => bb.ToJson("collection_on_derived")); + }); var model = modelBuilder.FinalizeModel(); var ownedEntities = model.FindEntityTypes(typeof(OwnedEntity)).ToList(); @@ -1581,44 +1594,49 @@ public virtual void Json_entity_with_tph_inheritance() public virtual void Json_entity_with_nested_structure_same_property_names() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1, bb => + modelBuilder.Entity( + b => { - bb.ToJson("ref1"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.OwnsOne( + x => x.OwnedReference1, bb => + { + bb.ToJson("ref1"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.OwnsOne(x => x.OwnedReference2, bb => - { - bb.ToJson("ref2"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.OwnsOne( + x => x.OwnedReference2, bb => + { + bb.ToJson("ref2"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.OwnsMany(x => x.OwnedCollection1, bb => - { - bb.ToJson("col1"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.OwnsMany( + x => x.OwnedCollection1, bb => + { + bb.ToJson("col1"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.OwnsMany(x => x.OwnedCollection2, bb => - { - bb.ToJson("col2"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); + b.OwnsMany( + x => x.OwnedCollection2, bb => + { + bb.ToJson("col2"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); }); - }); var model = modelBuilder.FinalizeModel(); var outerOwnedEntities = model.FindEntityTypes(typeof(OwnedEntityExtraLevel)); @@ -1629,10 +1647,18 @@ public virtual void Json_entity_with_nested_structure_same_property_names() Assert.Equal("Date", outerOwnedEntity.GetProperty("Date").GetJsonPropertyName()); Assert.Equal("Fraction", outerOwnedEntity.GetProperty("Fraction").GetJsonPropertyName()); Assert.Equal("Enum", outerOwnedEntity.GetProperty("Enum").GetJsonPropertyName()); - Assert.Equal("Reference1", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference1").TargetEntityType.GetJsonPropertyName()); - Assert.Equal("Reference2", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference2").TargetEntityType.GetJsonPropertyName()); - Assert.Equal("Collection1", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection1").TargetEntityType.GetJsonPropertyName()); - Assert.Equal("Collection2", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection2").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "Reference1", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference1").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "Reference2", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference2").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "Collection1", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection1").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "Collection2", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection2").TargetEntityType.GetJsonPropertyName()); } var ownedEntities = model.FindEntityTypes(typeof(OwnedEntity)); @@ -1650,29 +1676,32 @@ public virtual void Json_entity_with_nested_structure_same_property_names() public virtual void Json_entity_nested_enums_have_conversions_to_string_by_default_ToJson_first() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1, bb => + modelBuilder.Entity( + b => { - bb.ToJson(); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.OwnsOne( + x => x.OwnedReference1, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.Ignore(x => x.OwnedReference2); - b.OwnsMany(x => x.OwnedCollection1, bb => - { - bb.ToJson(); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.Ignore(x => x.OwnedReference2); + b.OwnsMany( + x => x.OwnedCollection1, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.Ignore(x => x.OwnedCollection2); - }); + b.Ignore(x => x.OwnedCollection2); + }); var model = modelBuilder.FinalizeModel(); var outerOwnedEntities = model.FindEntityTypes(typeof(OwnedEntityExtraLevel)); @@ -1702,29 +1731,32 @@ public virtual void Json_entity_nested_enums_have_conversions_to_string_by_defau public virtual void Json_entity_nested_enums_have_conversions_to_string_by_default_ToJson_last() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1, bb => + modelBuilder.Entity( + b => { - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - bb.ToJson(); - }); + b.OwnsOne( + x => x.OwnedReference1, bb => + { + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + bb.ToJson(); + }); - b.Ignore(x => x.OwnedReference2); - b.OwnsMany(x => x.OwnedCollection1, bb => - { - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - bb.ToJson(); - }); + b.Ignore(x => x.OwnedReference2); + b.OwnsMany( + x => x.OwnedCollection1, bb => + { + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + bb.ToJson(); + }); - b.Ignore(x => x.OwnedCollection2); - }); + b.Ignore(x => x.OwnedCollection2); + }); var model = modelBuilder.FinalizeModel(); var outerOwnedEntities = model.FindEntityTypes(typeof(OwnedEntityExtraLevel)); @@ -1754,31 +1786,34 @@ public virtual void Json_entity_nested_enums_have_conversions_to_string_by_defau public virtual void Entity_mapped_to_json_and_unwound_afterwards_properly_cleans_up_its_state() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1, bb => + modelBuilder.Entity( + b => { - bb.ToJson(); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - bb.ToJson(null); - }); + b.OwnsOne( + x => x.OwnedReference1, bb => + { + bb.ToJson(); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + bb.ToJson(null); + }); - b.Ignore(x => x.OwnedReference2); - b.OwnsMany(x => x.OwnedCollection1, bb => - { - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - bb.ToJson(); - bb.ToJson(null); - }); + b.Ignore(x => x.OwnedReference2); + b.OwnsMany( + x => x.OwnedCollection1, bb => + { + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + bb.ToJson(); + bb.ToJson(null); + }); - b.Ignore(x => x.OwnedCollection2); - }); + b.Ignore(x => x.OwnedCollection2); + }); var model = modelBuilder.FinalizeModel(); var outerOwnedEntities = model.FindEntityTypes(typeof(OwnedEntityExtraLevel)); @@ -1811,14 +1846,15 @@ public virtual void Entity_mapped_to_json_and_unwound_afterwards_properly_cleans public virtual void Json_entity_mapped_to_view() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.ToView("MyView"); - b.OwnsOne(x => x.OwnedReference1, bb => bb.ToJson()); - b.Ignore(x => x.OwnedReference2); - b.OwnsMany(x => x.OwnedCollection1, bb => bb.ToJson()); - b.Ignore(x => x.OwnedCollection2); - }); + modelBuilder.Entity( + b => + { + b.ToView("MyView"); + b.OwnsOne(x => x.OwnedReference1, bb => bb.ToJson()); + b.Ignore(x => x.OwnedReference2); + b.OwnsMany(x => x.OwnedCollection1, bb => bb.ToJson()); + b.Ignore(x => x.OwnedCollection2); + }); var model = modelBuilder.FinalizeModel(); @@ -1835,83 +1871,94 @@ public virtual void Json_entity_mapped_to_view() public virtual void Json_entity_with_custom_property_names() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1, bb => + modelBuilder.Entity( + b => { - bb.ToJson(); - bb.Property(x => x.Date).HasJsonPropertyName("OuterDate"); - bb.Property(x => x.Fraction).HasJsonPropertyName("OuterFraction"); - bb.Property(x => x.Enum).HasJsonPropertyName("OuterEnum"); - bb.OwnsOne(x => x.Reference1, bbb => - { - bbb.HasJsonPropertyName("RenamedReference1"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - bb.OwnsOne(x => x.Reference2, bbb => - { - bbb.HasJsonPropertyName("RenamedReference2"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - bb.OwnsMany(x => x.Collection1, bbb => - { - bbb.HasJsonPropertyName("RenamedCollection1"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - bb.OwnsMany(x => x.Collection2, bbb => - { - bbb.HasJsonPropertyName("RenamedCollection2"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - }); + b.OwnsOne( + x => x.OwnedReference1, bb => + { + bb.ToJson(); + bb.Property(x => x.Date).HasJsonPropertyName("OuterDate"); + bb.Property(x => x.Fraction).HasJsonPropertyName("OuterFraction"); + bb.Property(x => x.Enum).HasJsonPropertyName("OuterEnum"); + bb.OwnsOne( + x => x.Reference1, bbb => + { + bbb.HasJsonPropertyName("RenamedReference1"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + bb.OwnsOne( + x => x.Reference2, bbb => + { + bbb.HasJsonPropertyName("RenamedReference2"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + bb.OwnsMany( + x => x.Collection1, bbb => + { + bbb.HasJsonPropertyName("RenamedCollection1"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + bb.OwnsMany( + x => x.Collection2, bbb => + { + bbb.HasJsonPropertyName("RenamedCollection2"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + }); - b.OwnsMany(x => x.OwnedCollection1, bb => - { - bb.Property(x => x.Date).HasJsonPropertyName("OuterDate"); - bb.Property(x => x.Fraction).HasJsonPropertyName("OuterFraction"); - bb.Property(x => x.Enum).HasJsonPropertyName("OuterEnum"); - bb.OwnsOne(x => x.Reference1, bbb => - { - bbb.HasJsonPropertyName("RenamedReference1"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - bb.OwnsOne(x => x.Reference2, bbb => - { - bbb.HasJsonPropertyName("RenamedReference2"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - bb.OwnsMany(x => x.Collection1, bbb => - { - bbb.HasJsonPropertyName("RenamedCollection1"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - bb.OwnsMany(x => x.Collection2, bbb => - { - bbb.HasJsonPropertyName("RenamedCollection2"); - bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); - bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); - bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); - }); - bb.ToJson(); - }); + b.OwnsMany( + x => x.OwnedCollection1, bb => + { + bb.Property(x => x.Date).HasJsonPropertyName("OuterDate"); + bb.Property(x => x.Fraction).HasJsonPropertyName("OuterFraction"); + bb.Property(x => x.Enum).HasJsonPropertyName("OuterEnum"); + bb.OwnsOne( + x => x.Reference1, bbb => + { + bbb.HasJsonPropertyName("RenamedReference1"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + bb.OwnsOne( + x => x.Reference2, bbb => + { + bbb.HasJsonPropertyName("RenamedReference2"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + bb.OwnsMany( + x => x.Collection1, bbb => + { + bbb.HasJsonPropertyName("RenamedCollection1"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + bb.OwnsMany( + x => x.Collection2, bbb => + { + bbb.HasJsonPropertyName("RenamedCollection2"); + bbb.Property(x => x.Date).HasJsonPropertyName("InnerDate"); + bbb.Property(x => x.Fraction).HasJsonPropertyName("InnerFraction"); + bbb.Property(x => x.Enum).HasJsonPropertyName("InnerEnum"); + }); + bb.ToJson(); + }); - b.Ignore(x => x.OwnedReference2); - b.Ignore(x => x.OwnedCollection2); - }); + b.Ignore(x => x.OwnedReference2); + b.Ignore(x => x.OwnedCollection2); + }); var model = modelBuilder.FinalizeModel(); var outerOwnedEntities = model.FindEntityTypes(typeof(OwnedEntityExtraLevel)); @@ -1922,10 +1969,18 @@ public virtual void Json_entity_with_custom_property_names() Assert.Equal("OuterDate", outerOwnedEntity.GetProperty("Date").GetJsonPropertyName()); Assert.Equal("OuterFraction", outerOwnedEntity.GetProperty("Fraction").GetJsonPropertyName()); Assert.Equal("OuterEnum", outerOwnedEntity.GetProperty("Enum").GetJsonPropertyName()); - Assert.Equal("RenamedReference1", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference1").TargetEntityType.GetJsonPropertyName()); - Assert.Equal("RenamedReference2", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference2").TargetEntityType.GetJsonPropertyName()); - Assert.Equal("RenamedCollection1", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection1").TargetEntityType.GetJsonPropertyName()); - Assert.Equal("RenamedCollection2", outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection2").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "RenamedReference1", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference1").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "RenamedReference2", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Reference2").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "RenamedCollection1", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection1").TargetEntityType.GetJsonPropertyName()); + Assert.Equal( + "RenamedCollection2", + outerOwnedEntity.GetNavigations().Single(n => n.Name == "Collection2").TargetEntityType.GetJsonPropertyName()); } var ownedEntities = model.FindEntityTypes(typeof(OwnedEntity)); @@ -1944,13 +1999,14 @@ public virtual void Json_entity_and_normal_owned_can_exist_side_to_side_on_same_ { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1); - b.OwnsOne(x => x.OwnedReference2, bb => bb.ToJson("reference")); - b.OwnsMany(x => x.OwnedCollection1); - b.OwnsMany(x => x.OwnedCollection2, bb => bb.ToJson("collection")); - }); + modelBuilder.Entity( + b => + { + b.OwnsOne(x => x.OwnedReference1); + b.OwnsOne(x => x.OwnedReference2, bb => bb.ToJson("reference")); + b.OwnsMany(x => x.OwnedCollection1); + b.OwnsMany(x => x.OwnedCollection2, bb => bb.ToJson("collection")); + }); var model = modelBuilder.FinalizeModel(); @@ -1964,44 +2020,49 @@ public virtual void Json_entity_and_normal_owned_can_exist_side_to_side_on_same_ public virtual void Json_entity_with_nested_structure_same_property_names_() { var modelBuilder = CreateModelBuilder(); - modelBuilder.Entity(b => - { - b.OwnsOne(x => x.OwnedReference1, bb => + modelBuilder.Entity( + b => { - bb.ToJson("ref1"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.OwnsOne( + x => x.OwnedReference1, bb => + { + bb.ToJson("ref1"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.OwnsOne(x => x.OwnedReference2, bb => - { - bb.ToJson("ref2"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.OwnsOne( + x => x.OwnedReference2, bb => + { + bb.ToJson("ref2"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.OwnsMany(x => x.OwnedCollection1, bb => - { - bb.ToJson("col1"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); - }); + b.OwnsMany( + x => x.OwnedCollection1, bb => + { + bb.ToJson("col1"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); - b.OwnsMany(x => x.OwnedCollection2, bb => - { - bb.ToJson("col2"); - bb.OwnsOne(x => x.Reference1); - bb.OwnsOne(x => x.Reference2); - bb.OwnsMany(x => x.Collection1); - bb.OwnsMany(x => x.Collection2); + b.OwnsMany( + x => x.OwnedCollection2, bb => + { + bb.ToJson("col2"); + bb.OwnsOne(x => x.Reference1); + bb.OwnsOne(x => x.Reference2); + bb.OwnsMany(x => x.Collection1); + bb.OwnsMany(x => x.Collection2); + }); }); - }); var model = modelBuilder.FinalizeModel(); var outerOwnedEntities = model.FindEntityTypes(typeof(OwnedEntityExtraLevel)); @@ -2080,7 +2141,9 @@ public abstract class TestOwnedNavigationTemporalTableBuilder UseHistoryTable(string name, string? schema); + public abstract TestOwnedNavigationTemporalTableBuilder + UseHistoryTable(string name, string? schema); + public abstract TestOwnedNavigationTemporalPeriodPropertyBuilder HasPeriodStart(string propertyName); public abstract TestOwnedNavigationTemporalPeriodPropertyBuilder HasPeriodEnd(string propertyName); } @@ -2091,17 +2154,20 @@ public class GenericTestOwnedNavigationTemporalTableBuilder temporalTableBuilder) + public GenericTestOwnedNavigationTemporalTableBuilder( + OwnedNavigationTemporalTableBuilder temporalTableBuilder) { TemporalTableBuilder = temporalTableBuilder; } private OwnedNavigationTemporalTableBuilder TemporalTableBuilder { get; } - OwnedNavigationTemporalTableBuilder IInfrastructure>.Instance + OwnedNavigationTemporalTableBuilder + IInfrastructure>.Instance => TemporalTableBuilder; - protected virtual TestOwnedNavigationTemporalTableBuilder Wrap(OwnedNavigationTemporalTableBuilder tableBuilder) + protected virtual TestOwnedNavigationTemporalTableBuilder Wrap( + OwnedNavigationTemporalTableBuilder tableBuilder) => new GenericTestOwnedNavigationTemporalTableBuilder(tableBuilder); public override TestOwnedNavigationTemporalTableBuilder UseHistoryTable(string name, string? schema) @@ -2130,7 +2196,8 @@ public NonGenericTestOwnedNavigationTemporalTableBuilder(OwnedNavigationTemporal OwnedNavigationTemporalTableBuilder IInfrastructure.Instance => TemporalTableBuilder; - protected virtual TestOwnedNavigationTemporalTableBuilder Wrap(OwnedNavigationTemporalTableBuilder temporalTableBuilder) + protected virtual TestOwnedNavigationTemporalTableBuilder Wrap( + OwnedNavigationTemporalTableBuilder temporalTableBuilder) => new NonGenericTestOwnedNavigationTemporalTableBuilder(temporalTableBuilder); public override TestOwnedNavigationTemporalTableBuilder UseHistoryTable(string name, string? schema) diff --git a/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerTestModelBuilderExtensions.cs b/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerTestModelBuilderExtensions.cs index 127e52dd2fe..f2cb7b675f9 100644 --- a/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerTestModelBuilderExtensions.cs +++ b/test/EFCore.SqlServer.Tests/ModelBuilding/SqlServerTestModelBuilderExtensions.cs @@ -102,8 +102,8 @@ public static RelationalModelBuilderTest.TestTableBuilder IsTemporal IsTemporal ( - this RelationalModelBuilderTest.TestOwnedNavigationTableBuilder builder, - bool temporal = true) + this RelationalModelBuilderTest.TestOwnedNavigationTableBuilder builder, + bool temporal = true) where TOwnerEntity : class where TDependentEntity : class { @@ -131,11 +131,15 @@ public static RelationalModelBuilderTest.TestOwnedNavigationTableBuilder> genericBuilder: genericBuilder.Instance.IsTemporal( - b => buildAction(new SqlServerModelBuilderTestBase.GenericTestOwnedNavigationTemporalTableBuilder(b))); + b => buildAction( + new SqlServerModelBuilderTestBase.GenericTestOwnedNavigationTemporalTableBuilder( + b))); break; case IInfrastructure nongenericBuilder: nongenericBuilder.Instance.IsTemporal( - b => buildAction(new SqlServerModelBuilderTestBase.NonGenericTestOwnedNavigationTemporalTableBuilder(b))); + b => buildAction( + new SqlServerModelBuilderTestBase.NonGenericTestOwnedNavigationTemporalTableBuilder( + b))); break; } diff --git a/test/EFCore.SqlServer.Tests/Storage/SqlServerRetryingExecutionStrategyTests.cs b/test/EFCore.SqlServer.Tests/Storage/SqlServerRetryingExecutionStrategyTests.cs index 422135c6c3f..2f5180bc78f 100644 --- a/test/EFCore.SqlServer.Tests/Storage/SqlServerRetryingExecutionStrategyTests.cs +++ b/test/EFCore.SqlServer.Tests/Storage/SqlServerRetryingExecutionStrategyTests.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Storage; public class SqlServerRetryingExecutionStrategyTests diff --git a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingSourceTest.cs b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingSourceTest.cs index 2a822c8e7b4..4a80bf5becc 100644 --- a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingSourceTest.cs +++ b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingSourceTest.cs @@ -1227,6 +1227,7 @@ public void Can_map_time_base_type_precision(string typeName, int precision) Assert.Null(mapping.Scale); Assert.Equal(typeName, mapping.StoreType, true); } + private class VarTimeEntity { public int Id { get; set; } @@ -1235,7 +1236,6 @@ private class VarTimeEntity public TimeSpan TimeSpanWithPrecision { get; set; } } - [ConditionalTheory] [InlineData("binary varying")] [InlineData("binary")] diff --git a/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchFactoryTest.cs b/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchFactoryTest.cs index 98019c5272e..d80fbd07782 100644 --- a/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchFactoryTest.cs +++ b/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchFactoryTest.cs @@ -94,7 +94,7 @@ private static INonTrackedModificationCommand CreateModificationCommand( { var modificationCommand = new ModificationCommandFactory().CreateNonTrackedModificationCommand( new NonTrackedModificationCommandParameters( - name, schema, sensitiveLoggingEnabled)); + name, schema, sensitiveLoggingEnabled)); return modificationCommand; } diff --git a/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchTest.cs b/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchTest.cs index 873a6e4b4f8..2739516fa82 100644 --- a/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchTest.cs +++ b/test/EFCore.SqlServer.Tests/Update/SqlServerModificationCommandBatchTest.cs @@ -51,6 +51,7 @@ public void AddCommand_returns_false_when_max_parameters_are_reached(EntityState { command.AddColumnModification(CreateModificationParameters("col" + i)); } + Assert.True(batch.TryAddCommand(command)); var secondCommand = CreateModificationCommand("T2", null, false); diff --git a/test/EFCore.Sqlite.FunctionalTests/AutoincrementTest.cs b/test/EFCore.Sqlite.FunctionalTests/AutoincrementTest.cs index ce7984c7619..f53430849d4 100644 --- a/test/EFCore.Sqlite.FunctionalTests/AutoincrementTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/AutoincrementTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class AutoincrementTest : IClassFixture diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteFixture.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteFixture.cs index 70edfcfb2e6..de77e5c8235 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteFixture.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteFixture.cs @@ -5,5 +5,6 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class FiltersInheritanceBulkUpdatesSqliteFixture : InheritanceBulkUpdatesSqliteFixture { - protected override bool EnableFilters => true; + protected override bool EnableFilters + => true; } diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteTest.cs index 4252168b80a..bd91f43b3ed 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/FiltersInheritanceBulkUpdatesSqliteTest.cs @@ -177,7 +177,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqliteTest.cs index d822e9007b7..96903b65ba9 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesSqliteTest.cs @@ -176,7 +176,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqliteTest.cs index c254c34f22a..8ea602bcb2d 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqliteTest.cs @@ -5,7 +5,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class NonSharedModelBulkUpdatesSqliteTest : NonSharedModelBulkUpdatesTestBase { - protected override ITestStoreFactory TestStoreFactory => SqliteTestStoreFactory.Instance; + protected override ITestStoreFactory TestStoreFactory + => SqliteTestStoreFactory.Instance; [ConditionalFact] public virtual void Check_all_tests_overridden() diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs index 7dcd9286ddb..fbd9b9c4572 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore.Sqlite.Internal; namespace Microsoft.EntityFrameworkCore.BulkUpdates; @@ -46,8 +45,8 @@ public override async Task Delete_Where_parameter(bool async) DELETE FROM ""Order Details"" AS ""o"" WHERE ""o"".""Quantity"" = @__quantity_0", - // - @"DELETE FROM ""Order Details"" AS ""o"" + // + @"DELETE FROM ""Order Details"" AS ""o"" WHERE 0"); } @@ -560,18 +559,18 @@ public override async Task Update_Where_parameter_set_constant(bool async) UPDATE ""Customers"" AS ""c"" SET ""ContactName"" = 'Updated' WHERE ""c"".""CustomerID"" = @__customer_0", - // - @"@__customer_0='ALFKI' (Size = 5) + // + @"@__customer_0='ALFKI' (Size = 5) SELECT ""c"".""CustomerID"", ""c"".""Address"", ""c"".""City"", ""c"".""CompanyName"", ""c"".""ContactName"", ""c"".""ContactTitle"", ""c"".""Country"", ""c"".""Fax"", ""c"".""Phone"", ""c"".""PostalCode"", ""c"".""Region"" FROM ""Customers"" AS ""c"" WHERE ""c"".""CustomerID"" = @__customer_0", - // - @"SELECT ""c"".""CustomerID"", ""c"".""Address"", ""c"".""City"", ""c"".""CompanyName"", ""c"".""ContactName"", ""c"".""ContactTitle"", ""c"".""Country"", ""c"".""Fax"", ""c"".""Phone"", ""c"".""PostalCode"", ""c"".""Region"" + // + @"SELECT ""c"".""CustomerID"", ""c"".""Address"", ""c"".""City"", ""c"".""CompanyName"", ""c"".""ContactName"", ""c"".""ContactTitle"", ""c"".""Country"", ""c"".""Fax"", ""c"".""Phone"", ""c"".""PostalCode"", ""c"".""Region"" FROM ""Customers"" AS ""c"" WHERE 0", - // - @"UPDATE ""Customers"" AS ""c"" + // + @"UPDATE ""Customers"" AS ""c"" SET ""ContactName"" = 'Updated' WHERE 0"); } @@ -1110,12 +1109,14 @@ LEFT JOIN ( public override async Task Update_with_cross_join_cross_apply_set_constant(bool async) => Assert.Equal( SqliteStrings.ApplyNotSupported, - (await Assert.ThrowsAsync(() => base.Update_with_cross_join_cross_apply_set_constant(async))).Message); + (await Assert.ThrowsAsync(() => base.Update_with_cross_join_cross_apply_set_constant(async))) + .Message); public override async Task Update_with_cross_join_outer_apply_set_constant(bool async) => Assert.Equal( SqliteStrings.ApplyNotSupported, - (await Assert.ThrowsAsync(() => base.Update_with_cross_join_outer_apply_set_constant(async))).Message); + (await Assert.ThrowsAsync(() => base.Update_with_cross_join_outer_apply_set_constant(async))) + .Message); public override async Task Update_FromSql_set_constant(bool async) { diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteFixture.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteFixture.cs index a112c4bb7e0..91e15972862 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteFixture.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteFixture.cs @@ -3,7 +3,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; -public class TPCFiltersInheritanceBulkUpdatesSqliteFixture :TPCInheritanceBulkUpdatesSqliteFixture +public class TPCFiltersInheritanceBulkUpdatesSqliteFixture : TPCInheritanceBulkUpdatesSqliteFixture { - protected override bool EnableFilters => true; + protected override bool EnableFilters + => true; } diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs index 6cf9f617ce1..8272c7ae66b 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs @@ -3,7 +3,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; -public class TPCFiltersInheritanceBulkUpdatesSqliteTest : TPCFiltersInheritanceBulkUpdatesTestBase +public class TPCFiltersInheritanceBulkUpdatesSqliteTest : TPCFiltersInheritanceBulkUpdatesTestBase< + TPCFiltersInheritanceBulkUpdatesSqliteFixture> { public TPCFiltersInheritanceBulkUpdatesSqliteTest(TPCFiltersInheritanceBulkUpdatesSqliteFixture fixture) : base(fixture) @@ -165,7 +166,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs index c58ad0ad5b4..346c6cabbe3 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs @@ -165,7 +165,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteFixture.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteFixture.cs index 110a54c9077..cdf4c1fc186 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteFixture.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteFixture.cs @@ -5,5 +5,6 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; public class TPTFiltersInheritanceBulkUpdatesSqliteFixture : TPTInheritanceBulkUpdatesSqliteFixture { - protected override bool EnableFilters => true; + protected override bool EnableFilters + => true; } diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteTest.cs index a0da9740a2e..507ba7e78c0 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesSqliteTest.cs @@ -3,7 +3,8 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates; -public class TPTFiltersInheritanceBulkUpdatesSqliteTest : TPTFiltersInheritanceBulkUpdatesTestBase +public class TPTFiltersInheritanceBulkUpdatesSqliteTest : TPTFiltersInheritanceBulkUpdatesTestBase< + TPTFiltersInheritanceBulkUpdatesSqliteFixture> { public TPTFiltersInheritanceBulkUpdatesSqliteTest(TPTFiltersInheritanceBulkUpdatesSqliteFixture fixture) : base(fixture) @@ -154,7 +155,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqliteTest.cs index ea2adf71afc..ad97957f08d 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesSqliteTest.cs @@ -138,7 +138,8 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool AssertExecuteUpdateSql(); } - protected override void ClearLog() => Fixture.TestSqlLoggerFactory.Clear(); + protected override void ClearLog() + => Fixture.TestSqlLoggerFactory.Clear(); private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Sqlite.FunctionalTests/CommandConfigurationTest.cs b/test/EFCore.Sqlite.FunctionalTests/CommandConfigurationTest.cs index a63a5f3a916..e3260e6f320 100644 --- a/test/EFCore.Sqlite.FunctionalTests/CommandConfigurationTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/CommandConfigurationTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class CommandConfigurationTest : IClassFixture diff --git a/test/EFCore.Sqlite.FunctionalTests/DataAnnotationSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/DataAnnotationSqliteTest.cs index 04b7c74fd11..1ee39cb4c6a 100644 --- a/test/EFCore.Sqlite.FunctionalTests/DataAnnotationSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/DataAnnotationSqliteTest.cs @@ -16,7 +16,8 @@ public DataAnnotationSqliteTest(DataAnnotationSqliteFixture fixture, ITestOutput protected override void UseTransaction(DatabaseFacade facade, IDbContextTransaction transaction) => facade.UseTransaction(transaction.GetDbTransaction()); - protected override TestHelpers TestHelpers => SqliteTestHelpers.Instance; + protected override TestHelpers TestHelpers + => SqliteTestHelpers.Instance; public override IModel Non_public_annotations_are_enabled() { diff --git a/test/EFCore.Sqlite.FunctionalTests/DefaultValuesTest.cs b/test/EFCore.Sqlite.FunctionalTests/DefaultValuesTest.cs index 28c94ebbca2..838b609fa5c 100644 --- a/test/EFCore.Sqlite.FunctionalTests/DefaultValuesTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/DefaultValuesTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class DefaultValuesTest : SharedStoreFixtureBase diff --git a/test/EFCore.Sqlite.FunctionalTests/EntitySplittingSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/EntitySplittingSqliteTest.cs index d1d102de2c1..54e086adae5 100644 --- a/test/EFCore.Sqlite.FunctionalTests/EntitySplittingSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/EntitySplittingSqliteTest.cs @@ -12,9 +12,7 @@ public EntitySplittingSqliteTest(ITestOutputHelper testOutputHelper) protected override ITestStoreFactory TestStoreFactory => SqliteTestStoreFactory.Instance; - + protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - } + => base.OnModelCreating(modelBuilder); } diff --git a/test/EFCore.Sqlite.FunctionalTests/ManyToManyTrackingSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/ManyToManyTrackingSqliteTest.cs index bc8275ae217..f0f118fd2ff 100644 --- a/test/EFCore.Sqlite.FunctionalTests/ManyToManyTrackingSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/ManyToManyTrackingSqliteTest.cs @@ -51,7 +51,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con .Entity() .Property(e => e.Payload) .HasDefaultValue("Generated"); - } } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Migrations/MigrationsSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Migrations/MigrationsSqliteTest.cs index 5f8e1ade98f..a58fdd70208 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Migrations/MigrationsSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Migrations/MigrationsSqliteTest.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + using Microsoft.EntityFrameworkCore.Sqlite.Internal; using Microsoft.EntityFrameworkCore.Sqlite.Scaffolding.Internal; -#nullable enable - namespace Microsoft.EntityFrameworkCore.Migrations; public class MigrationsSqliteTest : MigrationsTestBase diff --git a/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs b/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs index 8c79f335556..0f9b69655e4 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs @@ -3,9 +3,9 @@ using Microsoft.EntityFrameworkCore.Sqlite.Internal; using Microsoft.EntityFrameworkCore.Sqlite.Metadata.Internal; +using NetTopologySuite.Geometries; namespace Microsoft.EntityFrameworkCore.Migrations; -using NetTopologySuite.Geometries; public class SqliteMigrationsSqlGeneratorTest : MigrationsSqlGeneratorTestBase { diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqliteTest.cs index 4c00d46b745..12ef9a44389 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqliteTest.cs @@ -46,15 +46,11 @@ public override async Task Prune_does_not_throw_null_ref(bool async) (await Assert.ThrowsAsync( () => base.Prune_does_not_throw_null_ref(async))).Message); - [ConditionalTheory(Skip = "Issue#26104")] - public override Task GroupBy_aggregate_where_required_relationship(bool async) - { - return base.GroupBy_aggregate_where_required_relationship(async); - } - - [ConditionalTheory(Skip = "Issue#26104")] - public override Task GroupBy_aggregate_where_required_relationship_2(bool async) - { - return base.GroupBy_aggregate_where_required_relationship_2(async); - } + [ConditionalTheory(Skip = "Issue#26104")] + public override Task GroupBy_aggregate_where_required_relationship(bool async) + => base.GroupBy_aggregate_where_required_relationship(async); + + [ConditionalTheory(Skip = "Issue#26104")] + public override Task GroupBy_aggregate_where_required_relationship_2(bool async) + => base.GroupBy_aggregate_where_required_relationship_2(async); } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/EntitySplittingQuerySqliteFixture.cs b/test/EFCore.Sqlite.FunctionalTests/Query/EntitySplittingQuerySqliteFixture.cs index 39cc26d50ce..0b81029afbc 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/EntitySplittingQuerySqliteFixture.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/EntitySplittingQuerySqliteFixture.cs @@ -5,5 +5,6 @@ namespace Microsoft.EntityFrameworkCore.Query; public class EntitySplittingQuerySqliteFixture : EntitySplittingQueryFixtureBase { - protected override ITestStoreFactory TestStoreFactory => SqliteTestStoreFactory.Instance; + protected override ITestStoreFactory TestStoreFactory + => SqliteTestStoreFactory.Instance; } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs index e31f8287ebb..557b2561891 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs @@ -7723,7 +7723,9 @@ public override async Task Assert.Equal( SqliteStrings.ApplyNotSupported, (await Assert.ThrowsAsync( - () => base.Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async))).Message); + () => base + .Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + async))).Message); AssertSql(); } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindGroupByQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindGroupByQuerySqliteTest.cs index 73294bad798..a8e0f4c622c 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindGroupByQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindGroupByQuerySqliteTest.cs @@ -50,7 +50,8 @@ public override Task GroupBy_aggregate_from_multiple_query_in_same_projection(bo => AssertApplyNotSupported(() => base.GroupBy_aggregate_from_multiple_query_in_same_projection(async)); public override Task Select_correlated_collection_after_GroupBy_aggregate_when_identifier_changes_to_complex(bool async) - => AssertApplyNotSupported(() => base.Select_correlated_collection_after_GroupBy_aggregate_when_identifier_changes_to_complex(async)); + => AssertApplyNotSupported( + () => base.Select_correlated_collection_after_GroupBy_aggregate_when_identifier_changes_to_complex(async)); public override Task GroupBy_aggregate_from_multiple_query_in_same_projection_3(bool async) => Assert.ThrowsAsync( diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/TPCGearsOfWarQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/TPCGearsOfWarQuerySqliteTest.cs index 179438bbb43..027896f02f0 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/TPCGearsOfWarQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/TPCGearsOfWarQuerySqliteTest.cs @@ -197,11 +197,15 @@ public override async Task Correlated_collections_with_Distinct(bool async) (await Assert.ThrowsAsync( () => base.Correlated_collections_with_Distinct(async))).Message); - public override async Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) + public override async Task + Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + bool async) => Assert.Equal( SqliteStrings.ApplyNotSupported, (await Assert.ThrowsAsync( - () => base.Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async))).Message); + () => base + .Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + async))).Message); public override async Task Negate_on_binary_expression(bool async) { diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/TPTGearsOfWarQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/TPTGearsOfWarQuerySqliteTest.cs index d4ab6d252f4..7a6846b83d2 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/TPTGearsOfWarQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/TPTGearsOfWarQuerySqliteTest.cs @@ -197,11 +197,15 @@ public override async Task Correlated_collections_with_Distinct(bool async) (await Assert.ThrowsAsync( () => base.Correlated_collections_with_Distinct(async))).Message); - public override async Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) + public override async Task + Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + bool async) => Assert.Equal( SqliteStrings.ApplyNotSupported, (await Assert.ThrowsAsync( - () => base.Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async))).Message); + () => base + .Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection( + async))).Message); public override async Task Negate_on_binary_expression(bool async) { diff --git a/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCreatorTest.cs b/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCreatorTest.cs index 80834b911e0..ee76183de82 100644 --- a/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCreatorTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCreatorTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class SqliteDatabaseCreatorTest diff --git a/test/EFCore.Sqlite.FunctionalTests/StoreGeneratedFixupSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/StoreGeneratedFixupSqliteTest.cs index c151c1b2c1d..68ad2208f6a 100644 --- a/test/EFCore.Sqlite.FunctionalTests/StoreGeneratedFixupSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/StoreGeneratedFixupSqliteTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore; public class StoreGeneratedFixupSqliteTest : StoreGeneratedFixupRelationalTestBase< diff --git a/test/EFCore.Sqlite.FunctionalTests/TableSplittingSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/TableSplittingSqliteTest.cs index 2d07c9edd5b..fb799a1f5cb 100644 --- a/test/EFCore.Sqlite.FunctionalTests/TableSplittingSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/TableSplittingSqliteTest.cs @@ -19,8 +19,8 @@ public override async Task ExecuteUpdate_works_for_table_sharing(bool async) AssertSql( @"UPDATE ""Vehicles"" AS ""v"" SET ""SeatingCapacity"" = 1", - // - @"SELECT NOT EXISTS ( + // + @"SELECT NOT EXISTS ( SELECT 1 FROM ""Vehicles"" AS ""v"" WHERE ""v"".""SeatingCapacity"" <> 1)"); diff --git a/test/EFCore.Sqlite.FunctionalTests/Update/SqliteUpdateSqlGeneratorTest.cs b/test/EFCore.Sqlite.FunctionalTests/Update/SqliteUpdateSqlGeneratorTest.cs index c49b1709151..91a885f3716 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Update/SqliteUpdateSqlGeneratorTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Update/SqliteUpdateSqlGeneratorTest.cs @@ -125,7 +125,8 @@ protected override void AppendDeleteOperation_creates_full_delete_command_text_v ", stringBuilder.ToString()); - protected override void AppendDeleteOperation_creates_full_delete_command_text_with_concurrency_check_verification(StringBuilder stringBuilder) + protected override void AppendDeleteOperation_creates_full_delete_command_text_with_concurrency_check_verification( + StringBuilder stringBuilder) => AssertBaseline( @"DELETE FROM ""Ducks"" WHERE ""Id"" = @p0 AND ""ConcurrencyToken"" IS NULL diff --git a/test/EFCore.Tests/ApiConsistencyTest.cs b/test/EFCore.Tests/ApiConsistencyTest.cs index 2d6fd6a7fd1..4484a680574 100644 --- a/test/EFCore.Tests/ApiConsistencyTest.cs +++ b/test/EFCore.Tests/ApiConsistencyTest.cs @@ -107,15 +107,19 @@ protected override void Initialize() typeof(OwnedNavigationBuilder).GetMethod( nameof(OwnedNavigationBuilder.OwnsMany), 0, new[] { typeof(Type), typeof(string) }), typeof(OwnedNavigationBuilder).GetMethod( - nameof(OwnedNavigationBuilder.OwnsOne), 0, new[] { typeof(string), typeof(string), typeof(Action) }), + nameof(OwnedNavigationBuilder.OwnsOne), 0, + new[] { typeof(string), typeof(string), typeof(Action) }), typeof(OwnedNavigationBuilder).GetMethod( - nameof(OwnedNavigationBuilder.OwnsOne), 0, new[] { typeof(string), typeof(Type), typeof(string), typeof(Action) }), + nameof(OwnedNavigationBuilder.OwnsOne), 0, + new[] { typeof(string), typeof(Type), typeof(string), typeof(Action) }), typeof(OwnedNavigationBuilder).GetMethod( nameof(OwnedNavigationBuilder.OwnsOne), 0, new[] { typeof(Type), typeof(string), typeof(Action) }), typeof(OwnedNavigationBuilder).GetMethod( - nameof(OwnedNavigationBuilder.OwnsMany), 0, new[] { typeof(string), typeof(string), typeof(Action) }), + nameof(OwnedNavigationBuilder.OwnsMany), 0, + new[] { typeof(string), typeof(string), typeof(Action) }), typeof(OwnedNavigationBuilder).GetMethod( - nameof(OwnedNavigationBuilder.OwnsMany), 0, new[] { typeof(string), typeof(Type), typeof(string), typeof(Action) }), + nameof(OwnedNavigationBuilder.OwnsMany), 0, + new[] { typeof(string), typeof(Type), typeof(string), typeof(Action) }), typeof(OwnedNavigationBuilder).GetMethod( nameof(OwnedNavigationBuilder.OwnsMany), 0, new[] { typeof(Type), typeof(string), typeof(Action) }), typeof(IConventionPropertyBase).GetMethod(nameof(IConventionPropertyBase.SetField), new[] { typeof(string), typeof(bool) }), diff --git a/test/EFCore.Tests/ChangeTracking/ChangeTrackerTest.cs b/test/EFCore.Tests/ChangeTracking/ChangeTrackerTest.cs index c2a4a0bf1ea..19329e44a34 100644 --- a/test/EFCore.Tests/ChangeTracking/ChangeTrackerTest.cs +++ b/test/EFCore.Tests/ChangeTracking/ChangeTrackerTest.cs @@ -1651,7 +1651,7 @@ public void DetectChanges_events_fire_for_fk_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var product = new Product { Category = new Category()}; + var product = new Product { Category = new Category() }; context.Attach(product); product.CategoryId = 2; @@ -1685,7 +1685,7 @@ public void DetectChanges_events_fire_for_reference_navigation_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var product = new Product { Category = new Category()}; + var product = new Product { Category = new Category() }; context.Attach(product); product.Category = null; @@ -1719,7 +1719,7 @@ public void DetectChanges_events_fire_for_collection_navigation_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var product = new Product { Category = new Category()}; + var product = new Product { Category = new Category() }; context.Attach(product); product.Category.Products.Clear(); @@ -1753,7 +1753,7 @@ public void DetectChanges_events_fire_for_skip_navigation_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var cat = new Cat(1) { Hats = { new Hat(2) }}; + var cat = new Cat(1) { Hats = { new Hat(2) } }; context.Attach(cat); cat.Hats.Clear(); @@ -1850,7 +1850,7 @@ public void Local_DetectChanges_events_fire_for_fk_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var product = new Product { Category = new Category()}; + var product = new Product { Category = new Category() }; context.Attach(product); product.CategoryId = 2; @@ -1882,7 +1882,7 @@ public void Local_DetectChanges_events_fire_for_reference_navigation_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var product = new Product { Category = new Category()}; + var product = new Product { Category = new Category() }; context.Attach(product); product.Category = null; @@ -1915,7 +1915,7 @@ public void Local_DetectChanges_events_fire_for_collection_navigation_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var product = new Product { Category = new Category()}; + var product = new Product { Category = new Category() }; context.Attach(product); product.Category.Products.Clear(); @@ -1947,7 +1947,7 @@ public void Local_DetectChanges_events_fire_for_skip_navigation_change() RegisterDetectAllEvents(context, detectingAll, detectedAll); RegisterDetectEntityEvents(context, detectingEntity, detectedEntity); - var cat = new Cat(1) { Hats = { new Hat(2) }}; + var cat = new Cat(1) { Hats = { new Hat(2) } }; context.Attach(cat); cat.Hats.Clear(); @@ -1972,7 +1972,7 @@ public void DetectChanges_event_can_be_used_to_know_when_all_properties_have_cha var context = scope.ServiceProvider.GetRequiredService(); var hat = new Hat(2) { Color = "Orange" }; - var cat1 = new Cat(1) { Hats = { hat }}; + var cat1 = new Cat(1) { Hats = { hat } }; var cat2 = new Cat(2); context.AttachRange(cat1, cat2); @@ -2342,7 +2342,7 @@ public void Can_remove_dependent_identifying_one_to_many(bool saveEntities) public void Setting_dependent_to_null_for_client_cascaded_optional_is_not_overwritten_by_DetectChanges() { using var context = new EarlyLearningCenter(); - var bobby = context.Add(new Bobby { Buggy = new() }).Entity; + var bobby = context.Add(new Bobby { Buggy = new Buggy() }).Entity; context.SaveChanges(); context.ChangeTracker.Clear(); @@ -2492,9 +2492,9 @@ public void Dependent_FKs_are_not_nulled_when_principal_is_detached(bool delayCa Id = 1, Products = { - new() { Id = 1 }, - new() { Id = 2 }, - new() { Id = 3 } + new OptionalProduct { Id = 1 }, + new OptionalProduct { Id = 2 }, + new OptionalProduct { Id = 3 } } }; @@ -3541,7 +3541,7 @@ public void Clearing_change_tracker_resets_local_view_count() { using var context = new LikeAZooContext(); - int originalCount = context.Cats.Local.Count; + var originalCount = context.Cats.Local.Count; context.Cats.Add(new Cat(3)); context.ChangeTracker.Clear(); @@ -3847,14 +3847,15 @@ protected internal override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity().Property(e => e.Id).ValueGeneratedNever(); - modelBuilder.Entity(entity => - { - entity.Property("BobbyId"); - entity.HasOne() - .WithOne(p => p.Buggy) - .HasForeignKey("BobbyId") - .OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity( + entity => + { + entity.Property("BobbyId"); + entity.HasOne() + .WithOne(p => p.Buggy) + .HasForeignKey("BobbyId") + .OnDelete(DeleteBehavior.Cascade); + }); } private class DummyValueGenerator : ValueGenerator diff --git a/test/EFCore.Tests/ChangeTracking/EntityEntryTest.cs b/test/EFCore.Tests/ChangeTracking/EntityEntryTest.cs index b5f52b7ab6a..ae5772810d0 100644 --- a/test/EFCore.Tests/ChangeTracking/EntityEntryTest.cs +++ b/test/EFCore.Tests/ChangeTracking/EntityEntryTest.cs @@ -572,7 +572,6 @@ public void Can_get_generic_collection_entry_by_lambda() Assert.Equal("Monkeys", context.Entry(entity).Collection(e => e.Monkeys).Metadata.Name); } - [ConditionalFact] public void Can_get_collection_entry_by_INavigationBase() { diff --git a/test/EFCore.Tests/ChangeTracking/Internal/ChangeDetectorTest.cs b/test/EFCore.Tests/ChangeTracking/Internal/ChangeDetectorTest.cs index f5bfb2a17c8..d562086f532 100644 --- a/test/EFCore.Tests/ChangeTracking/Internal/ChangeDetectorTest.cs +++ b/test/EFCore.Tests/ChangeTracking/Internal/ChangeDetectorTest.cs @@ -2129,8 +2129,9 @@ public override void AttachGraph( private class TestRelationshipListener : NavigationFixer { public TestRelationshipListener(IEntityGraphAttacher attacher) - : base(attacher, new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Enumerable.Empty()))) + : base( + attacher, new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Enumerable.Empty()))) { } diff --git a/test/EFCore.Tests/ChangeTracking/Internal/FixupTest.cs b/test/EFCore.Tests/ChangeTracking/Internal/FixupTest.cs index d7b94f4ddb0..bd4a2efa67c 100644 --- a/test/EFCore.Tests/ChangeTracking/Internal/FixupTest.cs +++ b/test/EFCore.Tests/ChangeTracking/Internal/FixupTest.cs @@ -2239,8 +2239,8 @@ public void Attaching_dependent_with_duplicate_principal_resolves(bool copy, boo ? new UpdatingIdentityResolutionInterceptor(preserveModified, updateOriginal) : new IgnoringIdentityResolutionInterceptor()); - var originalCategory = new Category(1) { Value1 = "Original", Value2 = "Original"}; - var originalProduct = new Product(1, 0) { Value1 = "Original", Value2 = "Original"}; + var originalCategory = new Category(1) { Value1 = "Original", Value2 = "Original" }; + var originalProduct = new Product(1, 0) { Value1 = "Original", Value2 = "Original" }; originalCategory.AddProduct(originalProduct); context.Attach(originalCategory); @@ -2250,8 +2250,8 @@ public void Attaching_dependent_with_duplicate_principal_resolves(bool copy, boo context.Entry(originalCategory).Property(e => e.Value2).CurrentValue = "Changed"; } - var newProduct = new Product(2, 0) { Value1 = "New", Value2 = "New"}; - var newCategory = new Category(1) { Value1 = "New", Value2 = "New"}; + var newProduct = new Product(2, 0) { Value1 = "New", Value2 = "New" }; + var newCategory = new Category(1) { Value1 = "New", Value2 = "New" }; newProduct.SetCategory(newCategory); context.Attach(newProduct); @@ -2514,7 +2514,10 @@ public void Attaching_one_to_one_dependent_with_duplicate_principal_resolves(boo [InlineData(true, false, true)] [InlineData(true, true, false)] [InlineData(true, true, true)] - public void Attaching_one_to_one_duplicate_dependent_with_duplicate_principal_resolves(bool copy, bool preserveModified, bool updateOriginal) + public void Attaching_one_to_one_duplicate_dependent_with_duplicate_principal_resolves( + bool copy, + bool preserveModified, + bool updateOriginal) { using var context = new FixupContext( copy @@ -2621,7 +2624,10 @@ public void Attaching_one_to_one_principal_with_duplicate_dependent_resolves(boo [InlineData(true, false, true)] [InlineData(true, true, false)] [InlineData(true, true, true)] - public void Attaching_one_to_one_duplicate_principal_with_duplicate_dependent_resolves(bool copy, bool preserveModified, bool updateOriginal) + public void Attaching_one_to_one_duplicate_principal_with_duplicate_dependent_resolves( + bool copy, + bool preserveModified, + bool updateOriginal) { using var context = new FixupContext( copy @@ -2678,7 +2684,10 @@ public void Attaching_one_to_one_duplicate_principal_with_duplicate_dependent_re [InlineData(true, true, false, true)] [InlineData(true, true, true, true)] public void Attaching_entity_with_duplicate_many_to_many_resolves( - bool copy, bool preserveModified, bool updateOriginal, bool attachCatless) + bool copy, + bool preserveModified, + bool updateOriginal, + bool attachCatless) { using var context = new FixupContext( copy @@ -2747,6 +2756,7 @@ public void Attaching_entity_with_duplicate_many_to_many_resolves( { context.Entry(human).Property(e => e.Age).CurrentValue--; } + foreach (var cat in originalCats) { context.Entry(cat).Property(e => e.Age).CurrentValue--; @@ -3960,7 +3970,8 @@ public void Detaching_required_one_to_many_principal_does_not_clear_navigation_t Assert.Same(principal, dependent.Category); Assert.Equal(principal.Id, dependent.CategoryId); Assert.Equal(EntityState.Detached, context.Entry(principal).State); - Assert.Equal(EntityState.Deleted, context.Entry(dependent).State); } + Assert.Equal(EntityState.Deleted, context.Entry(dependent).State); + } } [ConditionalFact] @@ -4049,11 +4060,7 @@ public void Detaching_optional_one_to_many_dependent_does_not_clear_navigation_t context.Database.EnsureCreated(); context.Add( - new FixupBlog - { - FixupSite = new(), - Posts = {new() { Tags = { new() }}} - }); + new FixupBlog { FixupSite = new FixupSite(), Posts = { new FixupPost { Tags = { new FixupTag() } } } }); context.SaveChanges(); } @@ -4091,11 +4098,7 @@ public void Detaching_optional_one_to_many_dependent_does_not_unclear_navigation context.Database.EnsureCreated(); context.Add( - new FixupBlog - { - FixupSite = new(), - Posts = {new() { Tags = { new() }}} - }); + new FixupBlog { FixupSite = new FixupSite(), Posts = { new FixupPost { Tags = { new FixupTag() } } } }); context.SaveChanges(); } @@ -4132,11 +4135,7 @@ public void Detaching_optional_one_to_many_principal_does_not_clear_navigation_t context.Database.EnsureCreated(); context.Add( - new FixupBlog - { - FixupSite = new(), - Posts = {new() { Tags = { new() }}} - }); + new FixupBlog { FixupSite = new FixupSite(), Posts = { new FixupPost { Tags = { new FixupTag() } } } }); context.SaveChanges(); } @@ -4173,11 +4172,7 @@ public void Detaching_optional_one_to_one_dependent_does_not_clear_navigation_to context.Database.EnsureCreated(); context.Add( - new FixupBlog - { - FixupSite = new(), - Posts = {new() { Tags = { new() }}} - }); + new FixupBlog { FixupSite = new FixupSite(), Posts = { new FixupPost { Tags = { new FixupTag() } } } }); context.SaveChanges(); } @@ -4215,11 +4210,7 @@ public void Detaching_optional_one_to_one_dependent_does_not_unclear_navigation_ context.Database.EnsureCreated(); context.Add( - new FixupBlog - { - FixupSite = new(), - Posts = {new() { Tags = { new() }}} - }); + new FixupBlog { FixupSite = new FixupSite(), Posts = { new FixupPost { Tags = { new FixupTag() } } } }); context.SaveChanges(); } @@ -4256,11 +4247,7 @@ public void Detaching_optional_one_to_one_principal_does_not_clear_navigation_to context.Database.EnsureCreated(); context.Add( - new FixupBlog - { - FixupSite = new(), - Posts = {new() { Tags = { new() }}} - }); + new FixupBlog { FixupSite = new FixupSite(), Posts = { new FixupPost { Tags = { new FixupTag() } } } }); context.SaveChanges(); } @@ -4297,11 +4284,7 @@ public void Detaching_other_side_of_deleted_many_to_many_does_not_clear_navigati context.Database.EnsureCreated(); context.Add( - new FixupBlog - { - FixupSite = new(), - Posts = {new() { Tags = { new() }}} - }); + new FixupBlog { FixupSite = new FixupSite(), Posts = { new FixupPost { Tags = { new FixupTag() } } } }); context.SaveChanges(); } diff --git a/test/EFCore.Tests/ChangeTracking/Internal/InternalEntityEntryFactoryTest.cs b/test/EFCore.Tests/ChangeTracking/Internal/InternalEntityEntryFactoryTest.cs index c765e2b015c..180a3211bea 100644 --- a/test/EFCore.Tests/ChangeTracking/Internal/InternalEntityEntryFactoryTest.cs +++ b/test/EFCore.Tests/ChangeTracking/Internal/InternalEntityEntryFactoryTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal; public class InternalEntityEntryFactoryTest diff --git a/test/EFCore.Tests/ChangeTracking/Internal/KeyPropagatorTest.cs b/test/EFCore.Tests/ChangeTracking/Internal/KeyPropagatorTest.cs index ad2c9f4190b..d9ffd383c7e 100644 --- a/test/EFCore.Tests/ChangeTracking/Internal/KeyPropagatorTest.cs +++ b/test/EFCore.Tests/ChangeTracking/Internal/KeyPropagatorTest.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable CollectionNeverUpdated.Local // ReSharper disable ClassNeverInstantiated.Local + namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal; public class KeyPropagatorTest diff --git a/test/EFCore.Tests/ChangeTracking/Internal/StateManagerTest.cs b/test/EFCore.Tests/ChangeTracking/Internal/StateManagerTest.cs index b9b5691970f..c8116a31f9f 100644 --- a/test/EFCore.Tests/ChangeTracking/Internal/StateManagerTest.cs +++ b/test/EFCore.Tests/ChangeTracking/Internal/StateManagerTest.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable MemberCanBePrivate.Local // ReSharper disable UnusedMember.Local // ReSharper disable UnusedAutoPropertyAccessor.Local // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal; public class StateManagerTest @@ -46,13 +45,25 @@ public void Identity_conflict_throws_for_primary_key() [InlineData(true)] public void Identity_conflict_can_be_resolved(bool copy) { - using var context = new IdentityConflictContext(copy - ? new UpdatingIdentityResolutionInterceptor() - : new IgnoringIdentityResolutionInterceptor()); + using var context = new IdentityConflictContext( + copy + ? new UpdatingIdentityResolutionInterceptor() + : new IgnoringIdentityResolutionInterceptor()); - var entity = new SingleKey { Id = 77, AlternateId = 66, Value = "Existing" }; + var entity = new SingleKey + { + Id = 77, + AlternateId = 66, + Value = "Existing" + }; context.Attach(entity); - context.Attach(new SingleKey { Id = 77, AlternateId = 66, Value = "New" }); + context.Attach( + new SingleKey + { + Id = 77, + AlternateId = 66, + Value = "New" + }); Assert.Single(context.ChangeTracker.Entries()); Assert.Equal(copy ? EntityState.Modified : EntityState.Unchanged, context.Entry(entity).State); @@ -117,9 +128,7 @@ public void Resolving_identity_conflict_for_alternate_key_cannot_change_primary_ private class NaiveCopyingIdentityResolutionInterceptor : IIdentityResolutionInterceptor { public void UpdateTrackedInstance(IdentityResolutionInterceptionData interceptionData, EntityEntry existingEntry, object newEntity) - { - existingEntry.CurrentValues.SetValues(newEntity); - } + => existingEntry.CurrentValues.SetValues(newEntity); } [ConditionalFact] @@ -167,9 +176,10 @@ public void Identity_conflict_throws_for_owned_primary_key() [InlineData(true)] public void Identity_conflict_can_be_resolved_for_owned(bool copy) { - using var context = new IdentityConflictContext(copy - ? new UpdatingIdentityResolutionInterceptor() - : new IgnoringIdentityResolutionInterceptor()); + using var context = new IdentityConflictContext( + copy + ? new UpdatingIdentityResolutionInterceptor() + : new IgnoringIdentityResolutionInterceptor()); var owned = new SingleKeyOwned { Value = "Existing" }; context.Attach( @@ -227,9 +237,10 @@ public void Identity_conflict_throws_for_composite_primary_key() [InlineData(true)] public void Identity_conflict_can_be_resolved_for_composite_primary_key(bool copy) { - using var context = new IdentityConflictContext(copy - ? new UpdatingIdentityResolutionInterceptor() - : new IgnoringIdentityResolutionInterceptor()); + using var context = new IdentityConflictContext( + copy + ? new UpdatingIdentityResolutionInterceptor() + : new IgnoringIdentityResolutionInterceptor()); var entity = new CompositeKey { diff --git a/test/EFCore.Tests/ChangeTracking/SkipMemberEntryTest.cs b/test/EFCore.Tests/ChangeTracking/SkipMemberEntryTest.cs index 0c57d77ae67..9af5dde6ed7 100644 --- a/test/EFCore.Tests/ChangeTracking/SkipMemberEntryTest.cs +++ b/test/EFCore.Tests/ChangeTracking/SkipMemberEntryTest.cs @@ -88,7 +88,6 @@ public void Can_get_skip_collection_entry_by_IPropertyBase_using_Member() Assert.IsType(entry); } - [ConditionalFact] public void Can_get_skip_collection_entry_by_name_using_Collection() { diff --git a/test/EFCore.Tests/DbContextLoggerTests.cs b/test/EFCore.Tests/DbContextLoggerTests.cs index c2ee7edac7d..5b52a081032 100644 --- a/test/EFCore.Tests/DbContextLoggerTests.cs +++ b/test/EFCore.Tests/DbContextLoggerTests.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Data.Common; - namespace Microsoft.EntityFrameworkCore; public class DbContextLoggerTests diff --git a/test/EFCore.Tests/Design/MethodCallCodeFragmentTest.cs b/test/EFCore.Tests/Design/MethodCallCodeFragmentTest.cs index 27c041e9e47..d823c3bdf9b 100644 --- a/test/EFCore.Tests/Design/MethodCallCodeFragmentTest.cs +++ b/test/EFCore.Tests/Design/MethodCallCodeFragmentTest.cs @@ -20,7 +20,8 @@ public virtual void Ctor_throw_when_too_many_parameters_instance() } private static readonly MethodInfo _extensionFuncMethodInfo - = typeof(MethodCallCodeFragmentTestExtensions).GetRuntimeMethod(nameof(MethodCallCodeFragmentTestExtensions.ExtensionFunc), new[] { typeof(MethodCallCodeFragmentTest), typeof(int) })!; + = typeof(MethodCallCodeFragmentTestExtensions).GetRuntimeMethod( + nameof(MethodCallCodeFragmentTestExtensions.ExtensionFunc), new[] { typeof(MethodCallCodeFragmentTest), typeof(int) })!; private static readonly MethodInfo _instanceFuncMethodInfo = typeof(MethodCallCodeFragmentTest).GetRuntimeMethod(nameof(InstanceFunc), new[] { typeof(int) })!; diff --git a/test/EFCore.Tests/Infrastructure/CoreEventIdTest.cs b/test/EFCore.Tests/Infrastructure/CoreEventIdTest.cs index 4f99d7a17f2..dde6de1d94f 100644 --- a/test/EFCore.Tests/Infrastructure/CoreEventIdTest.cs +++ b/test/EFCore.Tests/Infrastructure/CoreEventIdTest.cs @@ -49,7 +49,11 @@ public void Every_eventId_has_a_logger_method_and_logs_when_level_enabled() { typeof(ICollection), () => new List() }, { typeof(IReadOnlyList), () => new[] { property } }, { typeof(IReadOnlyList), () => Array.Empty() }, - { typeof(Func, EventDefinition, ConcurrencyExceptionEventData>), () => null }, + { + typeof(Func, EventDefinition, + ConcurrencyExceptionEventData>), + () => null + }, { typeof(IReadOnlyList), () => new[] { property } }, { typeof(IEnumerable>), () => new[] { new Tuple(propertyInfo, typeof(object)) } }, { typeof(MemberInfo), () => propertyInfo }, diff --git a/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs b/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs index a4eab9911ba..77a132a3415 100644 --- a/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs +++ b/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs @@ -1579,12 +1579,13 @@ public virtual void Required_navigation_targeting_derived_type_with_no_query_fil public virtual void Required_navigation_on_owned_type_with_query_filter_on_owner_doesnt_issue_a_warning() { var modelBuilder = CreateConventionModelBuilder(); - modelBuilder.Entity(e => - { - e.Ignore(i => i.PicturePosts); - e.HasQueryFilter(b => b.IsDeleted == false); - e.OwnsMany(i => i.BlogOwnedEntities); - }); + modelBuilder.Entity( + e => + { + e.Ignore(i => i.PicturePosts); + e.HasQueryFilter(b => b.IsDeleted == false); + e.OwnsMany(i => i.BlogOwnedEntities); + }); var message = CoreResources.LogPossibleIncorrectRequiredNavigationWithQueryFilterInteraction( CreateValidationLogger()).GenerateMessage(nameof(Blog), nameof(BlogOwnedEntity)); diff --git a/test/EFCore.Tests/Metadata/Conventions/CascadeDeleteConventionTest.cs b/test/EFCore.Tests/Metadata/Conventions/CascadeDeleteConventionTest.cs index d5c04db88d8..143e86ef595 100644 --- a/test/EFCore.Tests/Metadata/Conventions/CascadeDeleteConventionTest.cs +++ b/test/EFCore.Tests/Metadata/Conventions/CascadeDeleteConventionTest.cs @@ -1,13 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable UnusedAutoPropertyAccessor.Local // ReSharper disable UnusedMember.Local // ReSharper disable ClassNeverInstantiated.Local // ReSharper disable CollectionNeverUpdated.Local // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Metadata.Conventions; public class CascadeDeleteConventionTest diff --git a/test/EFCore.Tests/Metadata/Conventions/ConventionSetBuilderTests.cs b/test/EFCore.Tests/Metadata/Conventions/ConventionSetBuilderTests.cs index 01083a2fdaf..089595ca7f6 100644 --- a/test/EFCore.Tests/Metadata/Conventions/ConventionSetBuilderTests.cs +++ b/test/EFCore.Tests/Metadata/Conventions/ConventionSetBuilderTests.cs @@ -39,19 +39,19 @@ public virtual void Can_add_remove_and_replace_conventions() var conventionSet = GetConventionSet(); Assert.DoesNotContain(conventionSet.ModelFinalizingConventions, c => c is TestConvention); - + conventionSet.Add(new TestConvention()); Assert.Contains(conventionSet.ModelFinalizingConventions, c => c is TestConvention); Assert.DoesNotContain(conventionSet.ModelInitializedConventions, c => c is DerivedTestConvention); conventionSet.Replace(new DerivedTestConvention()); - + Assert.Contains(conventionSet.ModelFinalizingConventions, c => c is DerivedTestConvention); Assert.Contains(conventionSet.ModelInitializedConventions, c => c is DerivedTestConvention); conventionSet.Remove(typeof(TestConvention)); - + Assert.DoesNotContain(conventionSet.ModelFinalizingConventions, c => c is TestConvention); } @@ -63,7 +63,7 @@ public void ProcessModelFinalizing( { } } - + protected class DerivedTestConvention : TestConvention, IModelInitializedConvention { public void ProcessModelInitialized( diff --git a/test/EFCore.Tests/Metadata/Conventions/DeleteBehaviorAttributeConventionTest.cs b/test/EFCore.Tests/Metadata/Conventions/DeleteBehaviorAttributeConventionTest.cs index 59ee4cbc1de..3edfac832dd 100644 --- a/test/EFCore.Tests/Metadata/Conventions/DeleteBehaviorAttributeConventionTest.cs +++ b/test/EFCore.Tests/Metadata/Conventions/DeleteBehaviorAttributeConventionTest.cs @@ -6,11 +6,12 @@ // ReSharper disable ClassNeverInstantiated.Local // ReSharper disable CollectionNeverUpdated.Local // ReSharper disable InconsistentNaming -namespace Microsoft.EntityFrameworkCore.Metadata.Conventions; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +namespace Microsoft.EntityFrameworkCore.Metadata.Conventions; + public class DeleteBehaviorAttributeConventionTest { [ConditionalFact] @@ -92,7 +93,7 @@ public void Throw_InvalidOperationException_if_attribute_was_set_on_one_of_forei Assert.Throws( () => modelBuilder.Entity() .Property(e => e.Blog_On_FK_PropertyId)).Message - ); + ); } [ConditionalFact] @@ -140,6 +141,7 @@ private static ModelBuilder CreateModelBuilder() => InMemoryTestHelpers.Instance.CreateConventionBuilder(); #region DeleteBehaviorAttribute not set + private class Blog { public int Id { get; set; } @@ -155,8 +157,11 @@ private class Post public int? BlogId { get; set; } } + #endregion + #region DeleteBehaviourAttribute set to Restrict + private class Blog_Restrict { public int Id { get; set; } @@ -173,15 +178,19 @@ private class Post_Restrict public int? BlogId { get; set; } } + #endregion + #region DeleteBehaviourAttribute set on compound key + private class Blog_Compound { [Key] - [Column(Order=0)] + [Column(Order = 0)] public int Id { get; set; } + [Key] - [Column(Order=1)] + [Column(Order = 1)] public int Id2 { get; set; } public ICollection Posts { get; set; } @@ -201,14 +210,18 @@ private class Post_Compound [Column(Order = 1)] public int? BlogId2 { get; set; } } + #endregion + #region DeleteBehaviourAttribute set on two different foreign keys + private class Blog_One { public int Id { get; set; } public ICollection Posts { get; set; } } + private class Blog_Two { public int Id { get; set; } @@ -230,8 +243,11 @@ private class Post_Both public int? Blog_TwoId { get; set; } } + #endregion + #region DeleteBehaviourAttribute set on one of foreign key's properties + private class Blog_On_FK_Property { public int Id { get; set; } @@ -248,8 +264,11 @@ private class Post_On_FK_Property [DeleteBehavior(DeleteBehavior.Restrict)] public int? Blog_On_FK_PropertyId { get; set; } } + #endregion + #region DeleteBehaviourAttribute set on random property + private class Blog_On_Property { public int Id { get; set; } @@ -266,8 +285,11 @@ private class Post_On_Property public int? Blog_On_PropertyId { get; set; } } + #endregion + #region DeleteBehaviourAttribute set on principal navigation property + private class Blog_On_Principal { public int Id { get; set; } @@ -284,9 +306,11 @@ private class Post_On_Principal public int? Blog_On_PrincipalId { get; set; } } + #endregion #region DeleteBehaviourAttribute set on principal 1:1 relationship + private class Blog_On_Principal_OneToOne { public int Id { get; set; } @@ -303,5 +327,6 @@ private class Post_On_Principal_OneToOne public int? Blog_On_PrincipalId { get; set; } } + #endregion } diff --git a/test/EFCore.Tests/Metadata/Conventions/ForeignKeyIndexConventionTest.cs b/test/EFCore.Tests/Metadata/Conventions/ForeignKeyIndexConventionTest.cs index 27de836d32a..405ac777db2 100644 --- a/test/EFCore.Tests/Metadata/Conventions/ForeignKeyIndexConventionTest.cs +++ b/test/EFCore.Tests/Metadata/Conventions/ForeignKeyIndexConventionTest.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable ClassNeverInstantiated.Local // ReSharper disable ClassWithVirtualMembersNeverInherited.Local // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Metadata.Conventions; public class ForeignKeyIndexConventionTest diff --git a/test/EFCore.Tests/Metadata/Conventions/NavigationAttributeConventionTest.cs b/test/EFCore.Tests/Metadata/Conventions/NavigationAttributeConventionTest.cs index f90bc3670b2..4a77a94f124 100644 --- a/test/EFCore.Tests/Metadata/Conventions/NavigationAttributeConventionTest.cs +++ b/test/EFCore.Tests/Metadata/Conventions/NavigationAttributeConventionTest.cs @@ -889,7 +889,6 @@ private void RunRequiredNavigationAttributeConvention(InternalForeignKeyBuilder new RequiredNavigationAttributeConvention(dependencies) .ProcessNavigationAdded(navigation.Builder, context); - } private void RunNavigationBackingFieldAttributeConvention( @@ -969,6 +968,7 @@ public void BackingFieldAttribute_does_not_override_configuration_from_explicit_ #endregion #region DeleteBehaviorAttribute + [ConditionalFact] public void DeleteBehaviorAttribute_overrides_configuration_from_convention_source() { @@ -1015,7 +1015,6 @@ public void DeleteBehaviorAttribute_does_not_override_configuration_from_explici Assert.Equal(DeleteBehavior.NoAction, foreignKey.DeleteBehavior); } - private void RunDeleteBehaviorAttributeConvention( InternalForeignKeyBuilder relationshipBuilder, InternalNavigationBuilder navigationBuilder @@ -1028,6 +1027,7 @@ InternalNavigationBuilder navigationBuilder new DeleteBehaviorAttributeConvention(dependencies) .ProcessNavigationAdded(navigationBuilder, context); } + #endregion [ConditionalFact] diff --git a/test/EFCore.Tests/Metadata/Conventions/NonNullableReferencePropertyConventionTest.cs b/test/EFCore.Tests/Metadata/Conventions/NonNullableReferencePropertyConventionTest.cs index a8ae62337a0..28caf462f8f 100644 --- a/test/EFCore.Tests/Metadata/Conventions/NonNullableReferencePropertyConventionTest.cs +++ b/test/EFCore.Tests/Metadata/Conventions/NonNullableReferencePropertyConventionTest.cs @@ -116,7 +116,9 @@ private class A // ReSharper disable once UnusedMember.Local public int Id { get; set; } - public string NonNullable => ""; + public string NonNullable + => ""; + public string? Nullable { get; set; } [MaybeNull] diff --git a/test/EFCore.Tests/Metadata/Internal/ClrPropertyGetterFactoryTest.cs b/test/EFCore.Tests/Metadata/Internal/ClrPropertyGetterFactoryTest.cs index 85830b7be1c..1361619ac6b 100644 --- a/test/EFCore.Tests/Metadata/Internal/ClrPropertyGetterFactoryTest.cs +++ b/test/EFCore.Tests/Metadata/Internal/ClrPropertyGetterFactoryTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Metadata.Internal; public class ClrPropertyGetterFactoryTest diff --git a/test/EFCore.Tests/Metadata/Internal/EntityMaterializerSourceTest.cs b/test/EFCore.Tests/Metadata/Internal/EntityMaterializerSourceTest.cs index 17b5b816d83..2d63ed7a800 100644 --- a/test/EFCore.Tests/Metadata/Internal/EntityMaterializerSourceTest.cs +++ b/test/EFCore.Tests/Metadata/Internal/EntityMaterializerSourceTest.cs @@ -45,8 +45,9 @@ public void Can_create_materializer_for_entity_with_constructor_properties() entityType.Model.FinalizeModel(); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var gu = Guid.NewGuid(); var entity = (SomeEntity)factory( @@ -83,8 +84,9 @@ public void Can_create_materializer_for_entity_with_factory_method() entityType.Model.FinalizeModel(); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var gu = Guid.NewGuid(); var entity = (SomeEntity)factory( @@ -125,8 +127,9 @@ public void Can_create_materializer_for_entity_with_factory_method_with_object_a entityType.Model.FinalizeModel(); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var gu = Guid.NewGuid(); var entity = (SomeEntity)factory( @@ -160,8 +163,9 @@ public void Can_create_materializer_for_entity_with_instance_factory_method() entityType.Model.FinalizeModel(); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var gu = Guid.NewGuid(); var entity = (SomeEntity)factory( @@ -198,8 +202,9 @@ public void Can_create_materializer_for_entity_with_auto_properties() var entityType = CreateEntityType(); entityType.Model.FinalizeModel(); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var gu = Guid.NewGuid(); var entity = (SomeEntity)factory( @@ -232,8 +237,9 @@ public void Can_create_materializer_for_entity_with_fields() var entityType = modelBuilder.FinalizeModel().FindEntityType(typeof(SomeEntityWithFields)); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var gu = Guid.NewGuid(); var entity = (SomeEntityWithFields)factory( @@ -261,8 +267,9 @@ public void Can_read_nulls() var entityType = modelBuilder.FinalizeModel().FindEntityType(typeof(SomeEntity)); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var entity = (SomeEntity)factory( new MaterializationContext( @@ -294,8 +301,9 @@ public void Can_create_materializer_for_entity_ignoring_shadow_fields() var entityType = modelBuilder.FinalizeModel().FindEntityType(typeof(SomeEntity)); - var factory = GetMaterializer(new EntityMaterializerSource( - new EntityMaterializerSourceDependencies(Array.Empty())), entityType); + var factory = GetMaterializer( + new EntityMaterializerSource( + new EntityMaterializerSourceDependencies(Array.Empty())), entityType); var gu = Guid.NewGuid(); var entity = (SomeEntity)factory( diff --git a/test/EFCore.Tests/Metadata/Internal/InternalNavigationBuilderTest.cs b/test/EFCore.Tests/Metadata/Internal/InternalNavigationBuilderTest.cs index b5993525a71..6c0a34ae3dc 100644 --- a/test/EFCore.Tests/Metadata/Internal/InternalNavigationBuilderTest.cs +++ b/test/EFCore.Tests/Metadata/Internal/InternalNavigationBuilderTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Metadata.Internal; public class InternalNavigationBuilderTest diff --git a/test/EFCore.Tests/Metadata/Internal/InternalPropertyBuilderTest.cs b/test/EFCore.Tests/Metadata/Internal/InternalPropertyBuilderTest.cs index c626791aba2..ce771033de9 100644 --- a/test/EFCore.Tests/Metadata/Internal/InternalPropertyBuilderTest.cs +++ b/test/EFCore.Tests/Metadata/Internal/InternalPropertyBuilderTest.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming namespace Microsoft.EntityFrameworkCore.Metadata.Internal; diff --git a/test/EFCore.Tests/Metadata/Internal/InternalSkipNavigationBuilderTest.cs b/test/EFCore.Tests/Metadata/Internal/InternalSkipNavigationBuilderTest.cs index c30d9bba024..5f161db388f 100644 --- a/test/EFCore.Tests/Metadata/Internal/InternalSkipNavigationBuilderTest.cs +++ b/test/EFCore.Tests/Metadata/Internal/InternalSkipNavigationBuilderTest.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Metadata.Internal; public class InternalSkipNavigationBuilderTest diff --git a/test/EFCore.Tests/Metadata/Internal/PropertyBaseTest.cs b/test/EFCore.Tests/Metadata/Internal/PropertyBaseTest.cs index 3a92e9d85ab..7ab065a063e 100644 --- a/test/EFCore.Tests/Metadata/Internal/PropertyBaseTest.cs +++ b/test/EFCore.Tests/Metadata/Internal/PropertyBaseTest.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable InconsistentNaming // ReSharper disable ClassNeverInstantiated.Local // ReSharper disable MemberHidesStaticFromOuterClass @@ -12,6 +10,7 @@ // ReSharper disable FieldCanBeMadeReadOnly.Local // ReSharper disable UnusedMember.Local // ReSharper disable ConvertToAutoProperty + namespace Microsoft.EntityFrameworkCore.Metadata.Internal; public class PropertyBaseTest diff --git a/test/EFCore.Tests/Metadata/MetadataBuilderTest.cs b/test/EFCore.Tests/Metadata/MetadataBuilderTest.cs index 5b05cb866d8..55c177ad018 100644 --- a/test/EFCore.Tests/Metadata/MetadataBuilderTest.cs +++ b/test/EFCore.Tests/Metadata/MetadataBuilderTest.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - - // ReSharper disable MemberCanBePrivate.Local // ReSharper disable CollectionNeverUpdated.Local // ReSharper disable UnusedAutoPropertyAccessor.Local // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.Metadata; public class MetadataBuilderTest diff --git a/test/EFCore.Tests/ModelBuilding/GiantModel.cs b/test/EFCore.Tests/ModelBuilding/GiantModel.cs index 92b4557bfe3..19c62c3f8c9 100644 --- a/test/EFCore.Tests/ModelBuilding/GiantModel.cs +++ b/test/EFCore.Tests/ModelBuilding/GiantModel.cs @@ -1,18011 +1,18010 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; + // -namespace Microsoft.EntityFrameworkCore.ModelBuilding +namespace Microsoft.EntityFrameworkCore.ModelBuilding; + +public static class GiantModel { - public static class GiantModel + public class RelatedEntity1 { - public class RelatedEntity1 - { - public int Id { get; set; } + public int Id { get; set; } - public RelatedEntity2000 ParentEntity { get; set; } + public RelatedEntity2000 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity2 - { - public int Id { get; set; } + public class RelatedEntity2 + { + public int Id { get; set; } - public RelatedEntity1 ParentEntity { get; set; } + public RelatedEntity1 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity3 - { - public int Id { get; set; } + public class RelatedEntity3 + { + public int Id { get; set; } - public RelatedEntity2 ParentEntity { get; set; } + public RelatedEntity2 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity4 - { - public int Id { get; set; } + public class RelatedEntity4 + { + public int Id { get; set; } - public RelatedEntity3 ParentEntity { get; set; } + public RelatedEntity3 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity5 - { - public int Id { get; set; } + public class RelatedEntity5 + { + public int Id { get; set; } - public RelatedEntity4 ParentEntity { get; set; } + public RelatedEntity4 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity6 - { - public int Id { get; set; } + public class RelatedEntity6 + { + public int Id { get; set; } - public RelatedEntity5 ParentEntity { get; set; } + public RelatedEntity5 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity7 - { - public int Id { get; set; } + public class RelatedEntity7 + { + public int Id { get; set; } - public RelatedEntity6 ParentEntity { get; set; } + public RelatedEntity6 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity8 - { - public int Id { get; set; } + public class RelatedEntity8 + { + public int Id { get; set; } - public RelatedEntity7 ParentEntity { get; set; } + public RelatedEntity7 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity9 - { - public int Id { get; set; } + public class RelatedEntity9 + { + public int Id { get; set; } - public RelatedEntity8 ParentEntity { get; set; } + public RelatedEntity8 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity10 - { - public int Id { get; set; } + public class RelatedEntity10 + { + public int Id { get; set; } - public RelatedEntity9 ParentEntity { get; set; } + public RelatedEntity9 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity11 - { - public int Id { get; set; } + public class RelatedEntity11 + { + public int Id { get; set; } - public RelatedEntity10 ParentEntity { get; set; } + public RelatedEntity10 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity12 - { - public int Id { get; set; } + public class RelatedEntity12 + { + public int Id { get; set; } - public RelatedEntity11 ParentEntity { get; set; } + public RelatedEntity11 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity13 - { - public int Id { get; set; } + public class RelatedEntity13 + { + public int Id { get; set; } - public RelatedEntity12 ParentEntity { get; set; } + public RelatedEntity12 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity14 - { - public int Id { get; set; } + public class RelatedEntity14 + { + public int Id { get; set; } - public RelatedEntity13 ParentEntity { get; set; } + public RelatedEntity13 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity15 - { - public int Id { get; set; } + public class RelatedEntity15 + { + public int Id { get; set; } - public RelatedEntity14 ParentEntity { get; set; } + public RelatedEntity14 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity16 - { - public int Id { get; set; } + public class RelatedEntity16 + { + public int Id { get; set; } - public RelatedEntity15 ParentEntity { get; set; } + public RelatedEntity15 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity17 - { - public int Id { get; set; } + public class RelatedEntity17 + { + public int Id { get; set; } - public RelatedEntity16 ParentEntity { get; set; } + public RelatedEntity16 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity18 - { - public int Id { get; set; } + public class RelatedEntity18 + { + public int Id { get; set; } - public RelatedEntity17 ParentEntity { get; set; } + public RelatedEntity17 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity19 - { - public int Id { get; set; } + public class RelatedEntity19 + { + public int Id { get; set; } - public RelatedEntity18 ParentEntity { get; set; } + public RelatedEntity18 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity20 - { - public int Id { get; set; } + public class RelatedEntity20 + { + public int Id { get; set; } - public RelatedEntity19 ParentEntity { get; set; } + public RelatedEntity19 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity21 - { - public int Id { get; set; } + public class RelatedEntity21 + { + public int Id { get; set; } - public RelatedEntity20 ParentEntity { get; set; } + public RelatedEntity20 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity22 - { - public int Id { get; set; } + public class RelatedEntity22 + { + public int Id { get; set; } - public RelatedEntity21 ParentEntity { get; set; } + public RelatedEntity21 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity23 - { - public int Id { get; set; } + public class RelatedEntity23 + { + public int Id { get; set; } - public RelatedEntity22 ParentEntity { get; set; } + public RelatedEntity22 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity24 - { - public int Id { get; set; } + public class RelatedEntity24 + { + public int Id { get; set; } - public RelatedEntity23 ParentEntity { get; set; } + public RelatedEntity23 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity25 - { - public int Id { get; set; } + public class RelatedEntity25 + { + public int Id { get; set; } - public RelatedEntity24 ParentEntity { get; set; } + public RelatedEntity24 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity26 - { - public int Id { get; set; } + public class RelatedEntity26 + { + public int Id { get; set; } - public RelatedEntity25 ParentEntity { get; set; } + public RelatedEntity25 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity27 - { - public int Id { get; set; } + public class RelatedEntity27 + { + public int Id { get; set; } - public RelatedEntity26 ParentEntity { get; set; } + public RelatedEntity26 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity28 - { - public int Id { get; set; } + public class RelatedEntity28 + { + public int Id { get; set; } - public RelatedEntity27 ParentEntity { get; set; } + public RelatedEntity27 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity29 - { - public int Id { get; set; } + public class RelatedEntity29 + { + public int Id { get; set; } - public RelatedEntity28 ParentEntity { get; set; } + public RelatedEntity28 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity30 - { - public int Id { get; set; } + public class RelatedEntity30 + { + public int Id { get; set; } - public RelatedEntity29 ParentEntity { get; set; } + public RelatedEntity29 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity31 - { - public int Id { get; set; } + public class RelatedEntity31 + { + public int Id { get; set; } - public RelatedEntity30 ParentEntity { get; set; } + public RelatedEntity30 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity32 - { - public int Id { get; set; } + public class RelatedEntity32 + { + public int Id { get; set; } - public RelatedEntity31 ParentEntity { get; set; } + public RelatedEntity31 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity33 - { - public int Id { get; set; } + public class RelatedEntity33 + { + public int Id { get; set; } - public RelatedEntity32 ParentEntity { get; set; } + public RelatedEntity32 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity34 - { - public int Id { get; set; } + public class RelatedEntity34 + { + public int Id { get; set; } - public RelatedEntity33 ParentEntity { get; set; } + public RelatedEntity33 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity35 - { - public int Id { get; set; } + public class RelatedEntity35 + { + public int Id { get; set; } - public RelatedEntity34 ParentEntity { get; set; } + public RelatedEntity34 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity36 - { - public int Id { get; set; } + public class RelatedEntity36 + { + public int Id { get; set; } - public RelatedEntity35 ParentEntity { get; set; } + public RelatedEntity35 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity37 - { - public int Id { get; set; } + public class RelatedEntity37 + { + public int Id { get; set; } - public RelatedEntity36 ParentEntity { get; set; } + public RelatedEntity36 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity38 - { - public int Id { get; set; } + public class RelatedEntity38 + { + public int Id { get; set; } - public RelatedEntity37 ParentEntity { get; set; } + public RelatedEntity37 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity39 - { - public int Id { get; set; } + public class RelatedEntity39 + { + public int Id { get; set; } - public RelatedEntity38 ParentEntity { get; set; } + public RelatedEntity38 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity40 - { - public int Id { get; set; } + public class RelatedEntity40 + { + public int Id { get; set; } - public RelatedEntity39 ParentEntity { get; set; } + public RelatedEntity39 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity41 - { - public int Id { get; set; } + public class RelatedEntity41 + { + public int Id { get; set; } - public RelatedEntity40 ParentEntity { get; set; } + public RelatedEntity40 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity42 - { - public int Id { get; set; } + public class RelatedEntity42 + { + public int Id { get; set; } - public RelatedEntity41 ParentEntity { get; set; } + public RelatedEntity41 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity43 - { - public int Id { get; set; } + public class RelatedEntity43 + { + public int Id { get; set; } - public RelatedEntity42 ParentEntity { get; set; } + public RelatedEntity42 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity44 - { - public int Id { get; set; } + public class RelatedEntity44 + { + public int Id { get; set; } - public RelatedEntity43 ParentEntity { get; set; } + public RelatedEntity43 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity45 - { - public int Id { get; set; } + public class RelatedEntity45 + { + public int Id { get; set; } - public RelatedEntity44 ParentEntity { get; set; } + public RelatedEntity44 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity46 - { - public int Id { get; set; } + public class RelatedEntity46 + { + public int Id { get; set; } - public RelatedEntity45 ParentEntity { get; set; } + public RelatedEntity45 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity47 - { - public int Id { get; set; } + public class RelatedEntity47 + { + public int Id { get; set; } - public RelatedEntity46 ParentEntity { get; set; } + public RelatedEntity46 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity48 - { - public int Id { get; set; } + public class RelatedEntity48 + { + public int Id { get; set; } - public RelatedEntity47 ParentEntity { get; set; } + public RelatedEntity47 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity49 - { - public int Id { get; set; } + public class RelatedEntity49 + { + public int Id { get; set; } - public RelatedEntity48 ParentEntity { get; set; } + public RelatedEntity48 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity50 - { - public int Id { get; set; } + public class RelatedEntity50 + { + public int Id { get; set; } - public RelatedEntity49 ParentEntity { get; set; } + public RelatedEntity49 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity51 - { - public int Id { get; set; } + public class RelatedEntity51 + { + public int Id { get; set; } - public RelatedEntity50 ParentEntity { get; set; } + public RelatedEntity50 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity52 - { - public int Id { get; set; } + public class RelatedEntity52 + { + public int Id { get; set; } - public RelatedEntity51 ParentEntity { get; set; } + public RelatedEntity51 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity53 - { - public int Id { get; set; } + public class RelatedEntity53 + { + public int Id { get; set; } - public RelatedEntity52 ParentEntity { get; set; } + public RelatedEntity52 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity54 - { - public int Id { get; set; } + public class RelatedEntity54 + { + public int Id { get; set; } - public RelatedEntity53 ParentEntity { get; set; } + public RelatedEntity53 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity55 - { - public int Id { get; set; } + public class RelatedEntity55 + { + public int Id { get; set; } - public RelatedEntity54 ParentEntity { get; set; } + public RelatedEntity54 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity56 - { - public int Id { get; set; } + public class RelatedEntity56 + { + public int Id { get; set; } - public RelatedEntity55 ParentEntity { get; set; } + public RelatedEntity55 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity57 - { - public int Id { get; set; } + public class RelatedEntity57 + { + public int Id { get; set; } - public RelatedEntity56 ParentEntity { get; set; } + public RelatedEntity56 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity58 - { - public int Id { get; set; } + public class RelatedEntity58 + { + public int Id { get; set; } - public RelatedEntity57 ParentEntity { get; set; } + public RelatedEntity57 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity59 - { - public int Id { get; set; } + public class RelatedEntity59 + { + public int Id { get; set; } - public RelatedEntity58 ParentEntity { get; set; } + public RelatedEntity58 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity60 - { - public int Id { get; set; } + public class RelatedEntity60 + { + public int Id { get; set; } - public RelatedEntity59 ParentEntity { get; set; } + public RelatedEntity59 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity61 - { - public int Id { get; set; } + public class RelatedEntity61 + { + public int Id { get; set; } - public RelatedEntity60 ParentEntity { get; set; } + public RelatedEntity60 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity62 - { - public int Id { get; set; } + public class RelatedEntity62 + { + public int Id { get; set; } - public RelatedEntity61 ParentEntity { get; set; } + public RelatedEntity61 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity63 - { - public int Id { get; set; } + public class RelatedEntity63 + { + public int Id { get; set; } - public RelatedEntity62 ParentEntity { get; set; } + public RelatedEntity62 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity64 - { - public int Id { get; set; } + public class RelatedEntity64 + { + public int Id { get; set; } - public RelatedEntity63 ParentEntity { get; set; } + public RelatedEntity63 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity65 - { - public int Id { get; set; } + public class RelatedEntity65 + { + public int Id { get; set; } - public RelatedEntity64 ParentEntity { get; set; } + public RelatedEntity64 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity66 - { - public int Id { get; set; } + public class RelatedEntity66 + { + public int Id { get; set; } - public RelatedEntity65 ParentEntity { get; set; } + public RelatedEntity65 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity67 - { - public int Id { get; set; } + public class RelatedEntity67 + { + public int Id { get; set; } - public RelatedEntity66 ParentEntity { get; set; } + public RelatedEntity66 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity68 - { - public int Id { get; set; } + public class RelatedEntity68 + { + public int Id { get; set; } - public RelatedEntity67 ParentEntity { get; set; } + public RelatedEntity67 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity69 - { - public int Id { get; set; } + public class RelatedEntity69 + { + public int Id { get; set; } - public RelatedEntity68 ParentEntity { get; set; } + public RelatedEntity68 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity70 - { - public int Id { get; set; } + public class RelatedEntity70 + { + public int Id { get; set; } - public RelatedEntity69 ParentEntity { get; set; } + public RelatedEntity69 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity71 - { - public int Id { get; set; } + public class RelatedEntity71 + { + public int Id { get; set; } - public RelatedEntity70 ParentEntity { get; set; } + public RelatedEntity70 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity72 - { - public int Id { get; set; } + public class RelatedEntity72 + { + public int Id { get; set; } - public RelatedEntity71 ParentEntity { get; set; } + public RelatedEntity71 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity73 - { - public int Id { get; set; } + public class RelatedEntity73 + { + public int Id { get; set; } - public RelatedEntity72 ParentEntity { get; set; } + public RelatedEntity72 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity74 - { - public int Id { get; set; } + public class RelatedEntity74 + { + public int Id { get; set; } - public RelatedEntity73 ParentEntity { get; set; } + public RelatedEntity73 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity75 - { - public int Id { get; set; } + public class RelatedEntity75 + { + public int Id { get; set; } - public RelatedEntity74 ParentEntity { get; set; } + public RelatedEntity74 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity76 - { - public int Id { get; set; } + public class RelatedEntity76 + { + public int Id { get; set; } - public RelatedEntity75 ParentEntity { get; set; } + public RelatedEntity75 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity77 - { - public int Id { get; set; } + public class RelatedEntity77 + { + public int Id { get; set; } - public RelatedEntity76 ParentEntity { get; set; } + public RelatedEntity76 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity78 - { - public int Id { get; set; } + public class RelatedEntity78 + { + public int Id { get; set; } - public RelatedEntity77 ParentEntity { get; set; } + public RelatedEntity77 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity79 - { - public int Id { get; set; } + public class RelatedEntity79 + { + public int Id { get; set; } - public RelatedEntity78 ParentEntity { get; set; } + public RelatedEntity78 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity80 - { - public int Id { get; set; } + public class RelatedEntity80 + { + public int Id { get; set; } - public RelatedEntity79 ParentEntity { get; set; } + public RelatedEntity79 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity81 - { - public int Id { get; set; } + public class RelatedEntity81 + { + public int Id { get; set; } - public RelatedEntity80 ParentEntity { get; set; } + public RelatedEntity80 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity82 - { - public int Id { get; set; } + public class RelatedEntity82 + { + public int Id { get; set; } - public RelatedEntity81 ParentEntity { get; set; } + public RelatedEntity81 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity83 - { - public int Id { get; set; } + public class RelatedEntity83 + { + public int Id { get; set; } - public RelatedEntity82 ParentEntity { get; set; } + public RelatedEntity82 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity84 - { - public int Id { get; set; } + public class RelatedEntity84 + { + public int Id { get; set; } - public RelatedEntity83 ParentEntity { get; set; } + public RelatedEntity83 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity85 - { - public int Id { get; set; } + public class RelatedEntity85 + { + public int Id { get; set; } - public RelatedEntity84 ParentEntity { get; set; } + public RelatedEntity84 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity86 - { - public int Id { get; set; } + public class RelatedEntity86 + { + public int Id { get; set; } - public RelatedEntity85 ParentEntity { get; set; } + public RelatedEntity85 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity87 - { - public int Id { get; set; } + public class RelatedEntity87 + { + public int Id { get; set; } - public RelatedEntity86 ParentEntity { get; set; } + public RelatedEntity86 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity88 - { - public int Id { get; set; } + public class RelatedEntity88 + { + public int Id { get; set; } - public RelatedEntity87 ParentEntity { get; set; } + public RelatedEntity87 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity89 - { - public int Id { get; set; } + public class RelatedEntity89 + { + public int Id { get; set; } - public RelatedEntity88 ParentEntity { get; set; } + public RelatedEntity88 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity90 - { - public int Id { get; set; } + public class RelatedEntity90 + { + public int Id { get; set; } - public RelatedEntity89 ParentEntity { get; set; } + public RelatedEntity89 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity91 - { - public int Id { get; set; } + public class RelatedEntity91 + { + public int Id { get; set; } - public RelatedEntity90 ParentEntity { get; set; } + public RelatedEntity90 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity92 - { - public int Id { get; set; } + public class RelatedEntity92 + { + public int Id { get; set; } - public RelatedEntity91 ParentEntity { get; set; } + public RelatedEntity91 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity93 - { - public int Id { get; set; } + public class RelatedEntity93 + { + public int Id { get; set; } - public RelatedEntity92 ParentEntity { get; set; } + public RelatedEntity92 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity94 - { - public int Id { get; set; } + public class RelatedEntity94 + { + public int Id { get; set; } - public RelatedEntity93 ParentEntity { get; set; } + public RelatedEntity93 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity95 - { - public int Id { get; set; } + public class RelatedEntity95 + { + public int Id { get; set; } - public RelatedEntity94 ParentEntity { get; set; } + public RelatedEntity94 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity96 - { - public int Id { get; set; } + public class RelatedEntity96 + { + public int Id { get; set; } - public RelatedEntity95 ParentEntity { get; set; } + public RelatedEntity95 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity97 - { - public int Id { get; set; } + public class RelatedEntity97 + { + public int Id { get; set; } - public RelatedEntity96 ParentEntity { get; set; } + public RelatedEntity96 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity98 - { - public int Id { get; set; } + public class RelatedEntity98 + { + public int Id { get; set; } - public RelatedEntity97 ParentEntity { get; set; } + public RelatedEntity97 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity99 - { - public int Id { get; set; } + public class RelatedEntity99 + { + public int Id { get; set; } - public RelatedEntity98 ParentEntity { get; set; } + public RelatedEntity98 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity100 - { - public int Id { get; set; } + public class RelatedEntity100 + { + public int Id { get; set; } - public RelatedEntity99 ParentEntity { get; set; } + public RelatedEntity99 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity101 - { - public int Id { get; set; } + public class RelatedEntity101 + { + public int Id { get; set; } - public RelatedEntity100 ParentEntity { get; set; } + public RelatedEntity100 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity102 - { - public int Id { get; set; } + public class RelatedEntity102 + { + public int Id { get; set; } - public RelatedEntity101 ParentEntity { get; set; } + public RelatedEntity101 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity103 - { - public int Id { get; set; } + public class RelatedEntity103 + { + public int Id { get; set; } - public RelatedEntity102 ParentEntity { get; set; } + public RelatedEntity102 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity104 - { - public int Id { get; set; } + public class RelatedEntity104 + { + public int Id { get; set; } - public RelatedEntity103 ParentEntity { get; set; } + public RelatedEntity103 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity105 - { - public int Id { get; set; } + public class RelatedEntity105 + { + public int Id { get; set; } - public RelatedEntity104 ParentEntity { get; set; } + public RelatedEntity104 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity106 - { - public int Id { get; set; } + public class RelatedEntity106 + { + public int Id { get; set; } - public RelatedEntity105 ParentEntity { get; set; } + public RelatedEntity105 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity107 - { - public int Id { get; set; } + public class RelatedEntity107 + { + public int Id { get; set; } - public RelatedEntity106 ParentEntity { get; set; } + public RelatedEntity106 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity108 - { - public int Id { get; set; } + public class RelatedEntity108 + { + public int Id { get; set; } - public RelatedEntity107 ParentEntity { get; set; } + public RelatedEntity107 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity109 - { - public int Id { get; set; } + public class RelatedEntity109 + { + public int Id { get; set; } - public RelatedEntity108 ParentEntity { get; set; } + public RelatedEntity108 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity110 - { - public int Id { get; set; } + public class RelatedEntity110 + { + public int Id { get; set; } - public RelatedEntity109 ParentEntity { get; set; } + public RelatedEntity109 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity111 - { - public int Id { get; set; } + public class RelatedEntity111 + { + public int Id { get; set; } - public RelatedEntity110 ParentEntity { get; set; } + public RelatedEntity110 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity112 - { - public int Id { get; set; } + public class RelatedEntity112 + { + public int Id { get; set; } - public RelatedEntity111 ParentEntity { get; set; } + public RelatedEntity111 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity113 - { - public int Id { get; set; } + public class RelatedEntity113 + { + public int Id { get; set; } - public RelatedEntity112 ParentEntity { get; set; } + public RelatedEntity112 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity114 - { - public int Id { get; set; } + public class RelatedEntity114 + { + public int Id { get; set; } - public RelatedEntity113 ParentEntity { get; set; } + public RelatedEntity113 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity115 - { - public int Id { get; set; } + public class RelatedEntity115 + { + public int Id { get; set; } - public RelatedEntity114 ParentEntity { get; set; } + public RelatedEntity114 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity116 - { - public int Id { get; set; } + public class RelatedEntity116 + { + public int Id { get; set; } - public RelatedEntity115 ParentEntity { get; set; } + public RelatedEntity115 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity117 - { - public int Id { get; set; } + public class RelatedEntity117 + { + public int Id { get; set; } - public RelatedEntity116 ParentEntity { get; set; } + public RelatedEntity116 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity118 - { - public int Id { get; set; } + public class RelatedEntity118 + { + public int Id { get; set; } - public RelatedEntity117 ParentEntity { get; set; } + public RelatedEntity117 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity119 - { - public int Id { get; set; } + public class RelatedEntity119 + { + public int Id { get; set; } - public RelatedEntity118 ParentEntity { get; set; } + public RelatedEntity118 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity120 - { - public int Id { get; set; } + public class RelatedEntity120 + { + public int Id { get; set; } - public RelatedEntity119 ParentEntity { get; set; } + public RelatedEntity119 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity121 - { - public int Id { get; set; } + public class RelatedEntity121 + { + public int Id { get; set; } - public RelatedEntity120 ParentEntity { get; set; } + public RelatedEntity120 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity122 - { - public int Id { get; set; } + public class RelatedEntity122 + { + public int Id { get; set; } - public RelatedEntity121 ParentEntity { get; set; } + public RelatedEntity121 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity123 - { - public int Id { get; set; } + public class RelatedEntity123 + { + public int Id { get; set; } - public RelatedEntity122 ParentEntity { get; set; } + public RelatedEntity122 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity124 - { - public int Id { get; set; } + public class RelatedEntity124 + { + public int Id { get; set; } - public RelatedEntity123 ParentEntity { get; set; } + public RelatedEntity123 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity125 - { - public int Id { get; set; } + public class RelatedEntity125 + { + public int Id { get; set; } - public RelatedEntity124 ParentEntity { get; set; } + public RelatedEntity124 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity126 - { - public int Id { get; set; } + public class RelatedEntity126 + { + public int Id { get; set; } - public RelatedEntity125 ParentEntity { get; set; } + public RelatedEntity125 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity127 - { - public int Id { get; set; } + public class RelatedEntity127 + { + public int Id { get; set; } - public RelatedEntity126 ParentEntity { get; set; } + public RelatedEntity126 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity128 - { - public int Id { get; set; } + public class RelatedEntity128 + { + public int Id { get; set; } - public RelatedEntity127 ParentEntity { get; set; } + public RelatedEntity127 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity129 - { - public int Id { get; set; } + public class RelatedEntity129 + { + public int Id { get; set; } - public RelatedEntity128 ParentEntity { get; set; } + public RelatedEntity128 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity130 - { - public int Id { get; set; } + public class RelatedEntity130 + { + public int Id { get; set; } - public RelatedEntity129 ParentEntity { get; set; } + public RelatedEntity129 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity131 - { - public int Id { get; set; } + public class RelatedEntity131 + { + public int Id { get; set; } - public RelatedEntity130 ParentEntity { get; set; } + public RelatedEntity130 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity132 - { - public int Id { get; set; } + public class RelatedEntity132 + { + public int Id { get; set; } - public RelatedEntity131 ParentEntity { get; set; } + public RelatedEntity131 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity133 - { - public int Id { get; set; } + public class RelatedEntity133 + { + public int Id { get; set; } - public RelatedEntity132 ParentEntity { get; set; } + public RelatedEntity132 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity134 - { - public int Id { get; set; } + public class RelatedEntity134 + { + public int Id { get; set; } - public RelatedEntity133 ParentEntity { get; set; } + public RelatedEntity133 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity135 - { - public int Id { get; set; } + public class RelatedEntity135 + { + public int Id { get; set; } - public RelatedEntity134 ParentEntity { get; set; } + public RelatedEntity134 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity136 - { - public int Id { get; set; } + public class RelatedEntity136 + { + public int Id { get; set; } - public RelatedEntity135 ParentEntity { get; set; } + public RelatedEntity135 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity137 - { - public int Id { get; set; } + public class RelatedEntity137 + { + public int Id { get; set; } - public RelatedEntity136 ParentEntity { get; set; } + public RelatedEntity136 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity138 - { - public int Id { get; set; } + public class RelatedEntity138 + { + public int Id { get; set; } - public RelatedEntity137 ParentEntity { get; set; } + public RelatedEntity137 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity139 - { - public int Id { get; set; } + public class RelatedEntity139 + { + public int Id { get; set; } - public RelatedEntity138 ParentEntity { get; set; } + public RelatedEntity138 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity140 - { - public int Id { get; set; } + public class RelatedEntity140 + { + public int Id { get; set; } - public RelatedEntity139 ParentEntity { get; set; } + public RelatedEntity139 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity141 - { - public int Id { get; set; } + public class RelatedEntity141 + { + public int Id { get; set; } - public RelatedEntity140 ParentEntity { get; set; } + public RelatedEntity140 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity142 - { - public int Id { get; set; } + public class RelatedEntity142 + { + public int Id { get; set; } - public RelatedEntity141 ParentEntity { get; set; } + public RelatedEntity141 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity143 - { - public int Id { get; set; } + public class RelatedEntity143 + { + public int Id { get; set; } - public RelatedEntity142 ParentEntity { get; set; } + public RelatedEntity142 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity144 - { - public int Id { get; set; } + public class RelatedEntity144 + { + public int Id { get; set; } - public RelatedEntity143 ParentEntity { get; set; } + public RelatedEntity143 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity145 - { - public int Id { get; set; } + public class RelatedEntity145 + { + public int Id { get; set; } - public RelatedEntity144 ParentEntity { get; set; } + public RelatedEntity144 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity146 - { - public int Id { get; set; } + public class RelatedEntity146 + { + public int Id { get; set; } - public RelatedEntity145 ParentEntity { get; set; } + public RelatedEntity145 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity147 - { - public int Id { get; set; } + public class RelatedEntity147 + { + public int Id { get; set; } - public RelatedEntity146 ParentEntity { get; set; } + public RelatedEntity146 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity148 - { - public int Id { get; set; } + public class RelatedEntity148 + { + public int Id { get; set; } - public RelatedEntity147 ParentEntity { get; set; } + public RelatedEntity147 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity149 - { - public int Id { get; set; } + public class RelatedEntity149 + { + public int Id { get; set; } - public RelatedEntity148 ParentEntity { get; set; } + public RelatedEntity148 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity150 - { - public int Id { get; set; } + public class RelatedEntity150 + { + public int Id { get; set; } - public RelatedEntity149 ParentEntity { get; set; } + public RelatedEntity149 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity151 - { - public int Id { get; set; } + public class RelatedEntity151 + { + public int Id { get; set; } - public RelatedEntity150 ParentEntity { get; set; } + public RelatedEntity150 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity152 - { - public int Id { get; set; } + public class RelatedEntity152 + { + public int Id { get; set; } - public RelatedEntity151 ParentEntity { get; set; } + public RelatedEntity151 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity153 - { - public int Id { get; set; } + public class RelatedEntity153 + { + public int Id { get; set; } - public RelatedEntity152 ParentEntity { get; set; } + public RelatedEntity152 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity154 - { - public int Id { get; set; } + public class RelatedEntity154 + { + public int Id { get; set; } - public RelatedEntity153 ParentEntity { get; set; } + public RelatedEntity153 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity155 - { - public int Id { get; set; } + public class RelatedEntity155 + { + public int Id { get; set; } - public RelatedEntity154 ParentEntity { get; set; } + public RelatedEntity154 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity156 - { - public int Id { get; set; } + public class RelatedEntity156 + { + public int Id { get; set; } - public RelatedEntity155 ParentEntity { get; set; } + public RelatedEntity155 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity157 - { - public int Id { get; set; } + public class RelatedEntity157 + { + public int Id { get; set; } - public RelatedEntity156 ParentEntity { get; set; } + public RelatedEntity156 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity158 - { - public int Id { get; set; } + public class RelatedEntity158 + { + public int Id { get; set; } - public RelatedEntity157 ParentEntity { get; set; } + public RelatedEntity157 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity159 - { - public int Id { get; set; } + public class RelatedEntity159 + { + public int Id { get; set; } - public RelatedEntity158 ParentEntity { get; set; } + public RelatedEntity158 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity160 - { - public int Id { get; set; } + public class RelatedEntity160 + { + public int Id { get; set; } - public RelatedEntity159 ParentEntity { get; set; } + public RelatedEntity159 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity161 - { - public int Id { get; set; } + public class RelatedEntity161 + { + public int Id { get; set; } - public RelatedEntity160 ParentEntity { get; set; } + public RelatedEntity160 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity162 - { - public int Id { get; set; } + public class RelatedEntity162 + { + public int Id { get; set; } - public RelatedEntity161 ParentEntity { get; set; } + public RelatedEntity161 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity163 - { - public int Id { get; set; } + public class RelatedEntity163 + { + public int Id { get; set; } - public RelatedEntity162 ParentEntity { get; set; } + public RelatedEntity162 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity164 - { - public int Id { get; set; } + public class RelatedEntity164 + { + public int Id { get; set; } - public RelatedEntity163 ParentEntity { get; set; } + public RelatedEntity163 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity165 - { - public int Id { get; set; } + public class RelatedEntity165 + { + public int Id { get; set; } - public RelatedEntity164 ParentEntity { get; set; } + public RelatedEntity164 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity166 - { - public int Id { get; set; } + public class RelatedEntity166 + { + public int Id { get; set; } - public RelatedEntity165 ParentEntity { get; set; } + public RelatedEntity165 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity167 - { - public int Id { get; set; } + public class RelatedEntity167 + { + public int Id { get; set; } - public RelatedEntity166 ParentEntity { get; set; } + public RelatedEntity166 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity168 - { - public int Id { get; set; } + public class RelatedEntity168 + { + public int Id { get; set; } - public RelatedEntity167 ParentEntity { get; set; } + public RelatedEntity167 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity169 - { - public int Id { get; set; } + public class RelatedEntity169 + { + public int Id { get; set; } - public RelatedEntity168 ParentEntity { get; set; } + public RelatedEntity168 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity170 - { - public int Id { get; set; } + public class RelatedEntity170 + { + public int Id { get; set; } - public RelatedEntity169 ParentEntity { get; set; } + public RelatedEntity169 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity171 - { - public int Id { get; set; } + public class RelatedEntity171 + { + public int Id { get; set; } - public RelatedEntity170 ParentEntity { get; set; } + public RelatedEntity170 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity172 - { - public int Id { get; set; } + public class RelatedEntity172 + { + public int Id { get; set; } - public RelatedEntity171 ParentEntity { get; set; } + public RelatedEntity171 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity173 - { - public int Id { get; set; } + public class RelatedEntity173 + { + public int Id { get; set; } - public RelatedEntity172 ParentEntity { get; set; } + public RelatedEntity172 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity174 - { - public int Id { get; set; } + public class RelatedEntity174 + { + public int Id { get; set; } - public RelatedEntity173 ParentEntity { get; set; } + public RelatedEntity173 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity175 - { - public int Id { get; set; } + public class RelatedEntity175 + { + public int Id { get; set; } - public RelatedEntity174 ParentEntity { get; set; } + public RelatedEntity174 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity176 - { - public int Id { get; set; } + public class RelatedEntity176 + { + public int Id { get; set; } - public RelatedEntity175 ParentEntity { get; set; } + public RelatedEntity175 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity177 - { - public int Id { get; set; } + public class RelatedEntity177 + { + public int Id { get; set; } - public RelatedEntity176 ParentEntity { get; set; } + public RelatedEntity176 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity178 - { - public int Id { get; set; } + public class RelatedEntity178 + { + public int Id { get; set; } - public RelatedEntity177 ParentEntity { get; set; } + public RelatedEntity177 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity179 - { - public int Id { get; set; } + public class RelatedEntity179 + { + public int Id { get; set; } - public RelatedEntity178 ParentEntity { get; set; } + public RelatedEntity178 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity180 - { - public int Id { get; set; } + public class RelatedEntity180 + { + public int Id { get; set; } - public RelatedEntity179 ParentEntity { get; set; } + public RelatedEntity179 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity181 - { - public int Id { get; set; } + public class RelatedEntity181 + { + public int Id { get; set; } - public RelatedEntity180 ParentEntity { get; set; } + public RelatedEntity180 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity182 - { - public int Id { get; set; } + public class RelatedEntity182 + { + public int Id { get; set; } - public RelatedEntity181 ParentEntity { get; set; } + public RelatedEntity181 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity183 - { - public int Id { get; set; } + public class RelatedEntity183 + { + public int Id { get; set; } - public RelatedEntity182 ParentEntity { get; set; } + public RelatedEntity182 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity184 - { - public int Id { get; set; } + public class RelatedEntity184 + { + public int Id { get; set; } - public RelatedEntity183 ParentEntity { get; set; } + public RelatedEntity183 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity185 - { - public int Id { get; set; } + public class RelatedEntity185 + { + public int Id { get; set; } - public RelatedEntity184 ParentEntity { get; set; } + public RelatedEntity184 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity186 - { - public int Id { get; set; } + public class RelatedEntity186 + { + public int Id { get; set; } - public RelatedEntity185 ParentEntity { get; set; } + public RelatedEntity185 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity187 - { - public int Id { get; set; } + public class RelatedEntity187 + { + public int Id { get; set; } - public RelatedEntity186 ParentEntity { get; set; } + public RelatedEntity186 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity188 - { - public int Id { get; set; } + public class RelatedEntity188 + { + public int Id { get; set; } - public RelatedEntity187 ParentEntity { get; set; } + public RelatedEntity187 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity189 - { - public int Id { get; set; } + public class RelatedEntity189 + { + public int Id { get; set; } - public RelatedEntity188 ParentEntity { get; set; } + public RelatedEntity188 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity190 - { - public int Id { get; set; } + public class RelatedEntity190 + { + public int Id { get; set; } - public RelatedEntity189 ParentEntity { get; set; } + public RelatedEntity189 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity191 - { - public int Id { get; set; } + public class RelatedEntity191 + { + public int Id { get; set; } - public RelatedEntity190 ParentEntity { get; set; } + public RelatedEntity190 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity192 - { - public int Id { get; set; } + public class RelatedEntity192 + { + public int Id { get; set; } - public RelatedEntity191 ParentEntity { get; set; } + public RelatedEntity191 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity193 - { - public int Id { get; set; } + public class RelatedEntity193 + { + public int Id { get; set; } - public RelatedEntity192 ParentEntity { get; set; } + public RelatedEntity192 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity194 - { - public int Id { get; set; } + public class RelatedEntity194 + { + public int Id { get; set; } - public RelatedEntity193 ParentEntity { get; set; } + public RelatedEntity193 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity195 - { - public int Id { get; set; } + public class RelatedEntity195 + { + public int Id { get; set; } - public RelatedEntity194 ParentEntity { get; set; } + public RelatedEntity194 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity196 - { - public int Id { get; set; } + public class RelatedEntity196 + { + public int Id { get; set; } - public RelatedEntity195 ParentEntity { get; set; } + public RelatedEntity195 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity197 - { - public int Id { get; set; } + public class RelatedEntity197 + { + public int Id { get; set; } - public RelatedEntity196 ParentEntity { get; set; } + public RelatedEntity196 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity198 - { - public int Id { get; set; } + public class RelatedEntity198 + { + public int Id { get; set; } - public RelatedEntity197 ParentEntity { get; set; } + public RelatedEntity197 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity199 - { - public int Id { get; set; } + public class RelatedEntity199 + { + public int Id { get; set; } - public RelatedEntity198 ParentEntity { get; set; } + public RelatedEntity198 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity200 - { - public int Id { get; set; } + public class RelatedEntity200 + { + public int Id { get; set; } - public RelatedEntity199 ParentEntity { get; set; } + public RelatedEntity199 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity201 - { - public int Id { get; set; } + public class RelatedEntity201 + { + public int Id { get; set; } - public RelatedEntity200 ParentEntity { get; set; } + public RelatedEntity200 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity202 - { - public int Id { get; set; } + public class RelatedEntity202 + { + public int Id { get; set; } - public RelatedEntity201 ParentEntity { get; set; } + public RelatedEntity201 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity203 - { - public int Id { get; set; } + public class RelatedEntity203 + { + public int Id { get; set; } - public RelatedEntity202 ParentEntity { get; set; } + public RelatedEntity202 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity204 - { - public int Id { get; set; } + public class RelatedEntity204 + { + public int Id { get; set; } - public RelatedEntity203 ParentEntity { get; set; } + public RelatedEntity203 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity205 - { - public int Id { get; set; } + public class RelatedEntity205 + { + public int Id { get; set; } - public RelatedEntity204 ParentEntity { get; set; } + public RelatedEntity204 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity206 - { - public int Id { get; set; } + public class RelatedEntity206 + { + public int Id { get; set; } - public RelatedEntity205 ParentEntity { get; set; } + public RelatedEntity205 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity207 - { - public int Id { get; set; } + public class RelatedEntity207 + { + public int Id { get; set; } - public RelatedEntity206 ParentEntity { get; set; } + public RelatedEntity206 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity208 - { - public int Id { get; set; } + public class RelatedEntity208 + { + public int Id { get; set; } - public RelatedEntity207 ParentEntity { get; set; } + public RelatedEntity207 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity209 - { - public int Id { get; set; } + public class RelatedEntity209 + { + public int Id { get; set; } - public RelatedEntity208 ParentEntity { get; set; } + public RelatedEntity208 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity210 - { - public int Id { get; set; } + public class RelatedEntity210 + { + public int Id { get; set; } - public RelatedEntity209 ParentEntity { get; set; } + public RelatedEntity209 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity211 - { - public int Id { get; set; } + public class RelatedEntity211 + { + public int Id { get; set; } - public RelatedEntity210 ParentEntity { get; set; } + public RelatedEntity210 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity212 - { - public int Id { get; set; } + public class RelatedEntity212 + { + public int Id { get; set; } - public RelatedEntity211 ParentEntity { get; set; } + public RelatedEntity211 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity213 - { - public int Id { get; set; } + public class RelatedEntity213 + { + public int Id { get; set; } - public RelatedEntity212 ParentEntity { get; set; } + public RelatedEntity212 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity214 - { - public int Id { get; set; } + public class RelatedEntity214 + { + public int Id { get; set; } - public RelatedEntity213 ParentEntity { get; set; } + public RelatedEntity213 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity215 - { - public int Id { get; set; } + public class RelatedEntity215 + { + public int Id { get; set; } - public RelatedEntity214 ParentEntity { get; set; } + public RelatedEntity214 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity216 - { - public int Id { get; set; } + public class RelatedEntity216 + { + public int Id { get; set; } - public RelatedEntity215 ParentEntity { get; set; } + public RelatedEntity215 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity217 - { - public int Id { get; set; } + public class RelatedEntity217 + { + public int Id { get; set; } - public RelatedEntity216 ParentEntity { get; set; } + public RelatedEntity216 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity218 - { - public int Id { get; set; } + public class RelatedEntity218 + { + public int Id { get; set; } - public RelatedEntity217 ParentEntity { get; set; } + public RelatedEntity217 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity219 - { - public int Id { get; set; } + public class RelatedEntity219 + { + public int Id { get; set; } - public RelatedEntity218 ParentEntity { get; set; } + public RelatedEntity218 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity220 - { - public int Id { get; set; } + public class RelatedEntity220 + { + public int Id { get; set; } - public RelatedEntity219 ParentEntity { get; set; } + public RelatedEntity219 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity221 - { - public int Id { get; set; } + public class RelatedEntity221 + { + public int Id { get; set; } - public RelatedEntity220 ParentEntity { get; set; } + public RelatedEntity220 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity222 - { - public int Id { get; set; } + public class RelatedEntity222 + { + public int Id { get; set; } - public RelatedEntity221 ParentEntity { get; set; } + public RelatedEntity221 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity223 - { - public int Id { get; set; } + public class RelatedEntity223 + { + public int Id { get; set; } - public RelatedEntity222 ParentEntity { get; set; } + public RelatedEntity222 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity224 - { - public int Id { get; set; } + public class RelatedEntity224 + { + public int Id { get; set; } - public RelatedEntity223 ParentEntity { get; set; } + public RelatedEntity223 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity225 - { - public int Id { get; set; } + public class RelatedEntity225 + { + public int Id { get; set; } - public RelatedEntity224 ParentEntity { get; set; } + public RelatedEntity224 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity226 - { - public int Id { get; set; } + public class RelatedEntity226 + { + public int Id { get; set; } - public RelatedEntity225 ParentEntity { get; set; } + public RelatedEntity225 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity227 - { - public int Id { get; set; } + public class RelatedEntity227 + { + public int Id { get; set; } - public RelatedEntity226 ParentEntity { get; set; } + public RelatedEntity226 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity228 - { - public int Id { get; set; } + public class RelatedEntity228 + { + public int Id { get; set; } - public RelatedEntity227 ParentEntity { get; set; } + public RelatedEntity227 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity229 - { - public int Id { get; set; } + public class RelatedEntity229 + { + public int Id { get; set; } - public RelatedEntity228 ParentEntity { get; set; } + public RelatedEntity228 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity230 - { - public int Id { get; set; } + public class RelatedEntity230 + { + public int Id { get; set; } - public RelatedEntity229 ParentEntity { get; set; } + public RelatedEntity229 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity231 - { - public int Id { get; set; } + public class RelatedEntity231 + { + public int Id { get; set; } - public RelatedEntity230 ParentEntity { get; set; } + public RelatedEntity230 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity232 - { - public int Id { get; set; } + public class RelatedEntity232 + { + public int Id { get; set; } - public RelatedEntity231 ParentEntity { get; set; } + public RelatedEntity231 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity233 - { - public int Id { get; set; } + public class RelatedEntity233 + { + public int Id { get; set; } - public RelatedEntity232 ParentEntity { get; set; } + public RelatedEntity232 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity234 - { - public int Id { get; set; } + public class RelatedEntity234 + { + public int Id { get; set; } - public RelatedEntity233 ParentEntity { get; set; } + public RelatedEntity233 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity235 - { - public int Id { get; set; } + public class RelatedEntity235 + { + public int Id { get; set; } - public RelatedEntity234 ParentEntity { get; set; } + public RelatedEntity234 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity236 - { - public int Id { get; set; } + public class RelatedEntity236 + { + public int Id { get; set; } - public RelatedEntity235 ParentEntity { get; set; } + public RelatedEntity235 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity237 - { - public int Id { get; set; } + public class RelatedEntity237 + { + public int Id { get; set; } - public RelatedEntity236 ParentEntity { get; set; } + public RelatedEntity236 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity238 - { - public int Id { get; set; } + public class RelatedEntity238 + { + public int Id { get; set; } - public RelatedEntity237 ParentEntity { get; set; } + public RelatedEntity237 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity239 - { - public int Id { get; set; } + public class RelatedEntity239 + { + public int Id { get; set; } - public RelatedEntity238 ParentEntity { get; set; } + public RelatedEntity238 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity240 - { - public int Id { get; set; } + public class RelatedEntity240 + { + public int Id { get; set; } - public RelatedEntity239 ParentEntity { get; set; } + public RelatedEntity239 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity241 - { - public int Id { get; set; } + public class RelatedEntity241 + { + public int Id { get; set; } - public RelatedEntity240 ParentEntity { get; set; } + public RelatedEntity240 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity242 - { - public int Id { get; set; } + public class RelatedEntity242 + { + public int Id { get; set; } - public RelatedEntity241 ParentEntity { get; set; } + public RelatedEntity241 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity243 - { - public int Id { get; set; } + public class RelatedEntity243 + { + public int Id { get; set; } - public RelatedEntity242 ParentEntity { get; set; } + public RelatedEntity242 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity244 - { - public int Id { get; set; } + public class RelatedEntity244 + { + public int Id { get; set; } - public RelatedEntity243 ParentEntity { get; set; } + public RelatedEntity243 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity245 - { - public int Id { get; set; } + public class RelatedEntity245 + { + public int Id { get; set; } - public RelatedEntity244 ParentEntity { get; set; } + public RelatedEntity244 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity246 - { - public int Id { get; set; } + public class RelatedEntity246 + { + public int Id { get; set; } - public RelatedEntity245 ParentEntity { get; set; } + public RelatedEntity245 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity247 - { - public int Id { get; set; } + public class RelatedEntity247 + { + public int Id { get; set; } - public RelatedEntity246 ParentEntity { get; set; } + public RelatedEntity246 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity248 - { - public int Id { get; set; } + public class RelatedEntity248 + { + public int Id { get; set; } - public RelatedEntity247 ParentEntity { get; set; } + public RelatedEntity247 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity249 - { - public int Id { get; set; } + public class RelatedEntity249 + { + public int Id { get; set; } - public RelatedEntity248 ParentEntity { get; set; } + public RelatedEntity248 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity250 - { - public int Id { get; set; } + public class RelatedEntity250 + { + public int Id { get; set; } - public RelatedEntity249 ParentEntity { get; set; } + public RelatedEntity249 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity251 - { - public int Id { get; set; } + public class RelatedEntity251 + { + public int Id { get; set; } - public RelatedEntity250 ParentEntity { get; set; } + public RelatedEntity250 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity252 - { - public int Id { get; set; } + public class RelatedEntity252 + { + public int Id { get; set; } - public RelatedEntity251 ParentEntity { get; set; } + public RelatedEntity251 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity253 - { - public int Id { get; set; } + public class RelatedEntity253 + { + public int Id { get; set; } - public RelatedEntity252 ParentEntity { get; set; } + public RelatedEntity252 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity254 - { - public int Id { get; set; } + public class RelatedEntity254 + { + public int Id { get; set; } - public RelatedEntity253 ParentEntity { get; set; } + public RelatedEntity253 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity255 - { - public int Id { get; set; } + public class RelatedEntity255 + { + public int Id { get; set; } - public RelatedEntity254 ParentEntity { get; set; } + public RelatedEntity254 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity256 - { - public int Id { get; set; } + public class RelatedEntity256 + { + public int Id { get; set; } - public RelatedEntity255 ParentEntity { get; set; } + public RelatedEntity255 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity257 - { - public int Id { get; set; } + public class RelatedEntity257 + { + public int Id { get; set; } - public RelatedEntity256 ParentEntity { get; set; } + public RelatedEntity256 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity258 - { - public int Id { get; set; } + public class RelatedEntity258 + { + public int Id { get; set; } - public RelatedEntity257 ParentEntity { get; set; } + public RelatedEntity257 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity259 - { - public int Id { get; set; } + public class RelatedEntity259 + { + public int Id { get; set; } - public RelatedEntity258 ParentEntity { get; set; } + public RelatedEntity258 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity260 - { - public int Id { get; set; } + public class RelatedEntity260 + { + public int Id { get; set; } - public RelatedEntity259 ParentEntity { get; set; } + public RelatedEntity259 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity261 - { - public int Id { get; set; } + public class RelatedEntity261 + { + public int Id { get; set; } - public RelatedEntity260 ParentEntity { get; set; } + public RelatedEntity260 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity262 - { - public int Id { get; set; } + public class RelatedEntity262 + { + public int Id { get; set; } - public RelatedEntity261 ParentEntity { get; set; } + public RelatedEntity261 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity263 - { - public int Id { get; set; } + public class RelatedEntity263 + { + public int Id { get; set; } - public RelatedEntity262 ParentEntity { get; set; } + public RelatedEntity262 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity264 - { - public int Id { get; set; } + public class RelatedEntity264 + { + public int Id { get; set; } - public RelatedEntity263 ParentEntity { get; set; } + public RelatedEntity263 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity265 - { - public int Id { get; set; } + public class RelatedEntity265 + { + public int Id { get; set; } - public RelatedEntity264 ParentEntity { get; set; } + public RelatedEntity264 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity266 - { - public int Id { get; set; } + public class RelatedEntity266 + { + public int Id { get; set; } - public RelatedEntity265 ParentEntity { get; set; } + public RelatedEntity265 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity267 - { - public int Id { get; set; } + public class RelatedEntity267 + { + public int Id { get; set; } - public RelatedEntity266 ParentEntity { get; set; } + public RelatedEntity266 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity268 - { - public int Id { get; set; } + public class RelatedEntity268 + { + public int Id { get; set; } - public RelatedEntity267 ParentEntity { get; set; } + public RelatedEntity267 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity269 - { - public int Id { get; set; } + public class RelatedEntity269 + { + public int Id { get; set; } - public RelatedEntity268 ParentEntity { get; set; } + public RelatedEntity268 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity270 - { - public int Id { get; set; } + public class RelatedEntity270 + { + public int Id { get; set; } - public RelatedEntity269 ParentEntity { get; set; } + public RelatedEntity269 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity271 - { - public int Id { get; set; } + public class RelatedEntity271 + { + public int Id { get; set; } - public RelatedEntity270 ParentEntity { get; set; } + public RelatedEntity270 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity272 - { - public int Id { get; set; } + public class RelatedEntity272 + { + public int Id { get; set; } - public RelatedEntity271 ParentEntity { get; set; } + public RelatedEntity271 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity273 - { - public int Id { get; set; } + public class RelatedEntity273 + { + public int Id { get; set; } - public RelatedEntity272 ParentEntity { get; set; } + public RelatedEntity272 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity274 - { - public int Id { get; set; } + public class RelatedEntity274 + { + public int Id { get; set; } - public RelatedEntity273 ParentEntity { get; set; } + public RelatedEntity273 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity275 - { - public int Id { get; set; } + public class RelatedEntity275 + { + public int Id { get; set; } - public RelatedEntity274 ParentEntity { get; set; } + public RelatedEntity274 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity276 - { - public int Id { get; set; } + public class RelatedEntity276 + { + public int Id { get; set; } - public RelatedEntity275 ParentEntity { get; set; } + public RelatedEntity275 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity277 - { - public int Id { get; set; } + public class RelatedEntity277 + { + public int Id { get; set; } - public RelatedEntity276 ParentEntity { get; set; } + public RelatedEntity276 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity278 - { - public int Id { get; set; } + public class RelatedEntity278 + { + public int Id { get; set; } - public RelatedEntity277 ParentEntity { get; set; } + public RelatedEntity277 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity279 - { - public int Id { get; set; } + public class RelatedEntity279 + { + public int Id { get; set; } - public RelatedEntity278 ParentEntity { get; set; } + public RelatedEntity278 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity280 - { - public int Id { get; set; } + public class RelatedEntity280 + { + public int Id { get; set; } - public RelatedEntity279 ParentEntity { get; set; } + public RelatedEntity279 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity281 - { - public int Id { get; set; } + public class RelatedEntity281 + { + public int Id { get; set; } - public RelatedEntity280 ParentEntity { get; set; } + public RelatedEntity280 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity282 - { - public int Id { get; set; } + public class RelatedEntity282 + { + public int Id { get; set; } - public RelatedEntity281 ParentEntity { get; set; } + public RelatedEntity281 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity283 - { - public int Id { get; set; } + public class RelatedEntity283 + { + public int Id { get; set; } - public RelatedEntity282 ParentEntity { get; set; } + public RelatedEntity282 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity284 - { - public int Id { get; set; } + public class RelatedEntity284 + { + public int Id { get; set; } - public RelatedEntity283 ParentEntity { get; set; } + public RelatedEntity283 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity285 - { - public int Id { get; set; } + public class RelatedEntity285 + { + public int Id { get; set; } - public RelatedEntity284 ParentEntity { get; set; } + public RelatedEntity284 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity286 - { - public int Id { get; set; } + public class RelatedEntity286 + { + public int Id { get; set; } - public RelatedEntity285 ParentEntity { get; set; } + public RelatedEntity285 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity287 - { - public int Id { get; set; } + public class RelatedEntity287 + { + public int Id { get; set; } - public RelatedEntity286 ParentEntity { get; set; } + public RelatedEntity286 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity288 - { - public int Id { get; set; } + public class RelatedEntity288 + { + public int Id { get; set; } - public RelatedEntity287 ParentEntity { get; set; } + public RelatedEntity287 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity289 - { - public int Id { get; set; } + public class RelatedEntity289 + { + public int Id { get; set; } - public RelatedEntity288 ParentEntity { get; set; } + public RelatedEntity288 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity290 - { - public int Id { get; set; } + public class RelatedEntity290 + { + public int Id { get; set; } - public RelatedEntity289 ParentEntity { get; set; } + public RelatedEntity289 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity291 - { - public int Id { get; set; } + public class RelatedEntity291 + { + public int Id { get; set; } - public RelatedEntity290 ParentEntity { get; set; } + public RelatedEntity290 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity292 - { - public int Id { get; set; } + public class RelatedEntity292 + { + public int Id { get; set; } - public RelatedEntity291 ParentEntity { get; set; } + public RelatedEntity291 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity293 - { - public int Id { get; set; } + public class RelatedEntity293 + { + public int Id { get; set; } - public RelatedEntity292 ParentEntity { get; set; } + public RelatedEntity292 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity294 - { - public int Id { get; set; } + public class RelatedEntity294 + { + public int Id { get; set; } - public RelatedEntity293 ParentEntity { get; set; } + public RelatedEntity293 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity295 - { - public int Id { get; set; } + public class RelatedEntity295 + { + public int Id { get; set; } - public RelatedEntity294 ParentEntity { get; set; } + public RelatedEntity294 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity296 - { - public int Id { get; set; } + public class RelatedEntity296 + { + public int Id { get; set; } - public RelatedEntity295 ParentEntity { get; set; } + public RelatedEntity295 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity297 - { - public int Id { get; set; } + public class RelatedEntity297 + { + public int Id { get; set; } - public RelatedEntity296 ParentEntity { get; set; } + public RelatedEntity296 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity298 - { - public int Id { get; set; } + public class RelatedEntity298 + { + public int Id { get; set; } - public RelatedEntity297 ParentEntity { get; set; } + public RelatedEntity297 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity299 - { - public int Id { get; set; } + public class RelatedEntity299 + { + public int Id { get; set; } - public RelatedEntity298 ParentEntity { get; set; } + public RelatedEntity298 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity300 - { - public int Id { get; set; } + public class RelatedEntity300 + { + public int Id { get; set; } - public RelatedEntity299 ParentEntity { get; set; } + public RelatedEntity299 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity301 - { - public int Id { get; set; } + public class RelatedEntity301 + { + public int Id { get; set; } - public RelatedEntity300 ParentEntity { get; set; } + public RelatedEntity300 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity302 - { - public int Id { get; set; } + public class RelatedEntity302 + { + public int Id { get; set; } - public RelatedEntity301 ParentEntity { get; set; } + public RelatedEntity301 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity303 - { - public int Id { get; set; } + public class RelatedEntity303 + { + public int Id { get; set; } - public RelatedEntity302 ParentEntity { get; set; } + public RelatedEntity302 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity304 - { - public int Id { get; set; } + public class RelatedEntity304 + { + public int Id { get; set; } - public RelatedEntity303 ParentEntity { get; set; } + public RelatedEntity303 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity305 - { - public int Id { get; set; } + public class RelatedEntity305 + { + public int Id { get; set; } - public RelatedEntity304 ParentEntity { get; set; } + public RelatedEntity304 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity306 - { - public int Id { get; set; } + public class RelatedEntity306 + { + public int Id { get; set; } - public RelatedEntity305 ParentEntity { get; set; } + public RelatedEntity305 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity307 - { - public int Id { get; set; } + public class RelatedEntity307 + { + public int Id { get; set; } - public RelatedEntity306 ParentEntity { get; set; } + public RelatedEntity306 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity308 - { - public int Id { get; set; } + public class RelatedEntity308 + { + public int Id { get; set; } - public RelatedEntity307 ParentEntity { get; set; } + public RelatedEntity307 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity309 - { - public int Id { get; set; } + public class RelatedEntity309 + { + public int Id { get; set; } - public RelatedEntity308 ParentEntity { get; set; } + public RelatedEntity308 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity310 - { - public int Id { get; set; } + public class RelatedEntity310 + { + public int Id { get; set; } - public RelatedEntity309 ParentEntity { get; set; } + public RelatedEntity309 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity311 - { - public int Id { get; set; } + public class RelatedEntity311 + { + public int Id { get; set; } - public RelatedEntity310 ParentEntity { get; set; } + public RelatedEntity310 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity312 - { - public int Id { get; set; } + public class RelatedEntity312 + { + public int Id { get; set; } - public RelatedEntity311 ParentEntity { get; set; } + public RelatedEntity311 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity313 - { - public int Id { get; set; } + public class RelatedEntity313 + { + public int Id { get; set; } - public RelatedEntity312 ParentEntity { get; set; } + public RelatedEntity312 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity314 - { - public int Id { get; set; } + public class RelatedEntity314 + { + public int Id { get; set; } - public RelatedEntity313 ParentEntity { get; set; } + public RelatedEntity313 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity315 - { - public int Id { get; set; } + public class RelatedEntity315 + { + public int Id { get; set; } - public RelatedEntity314 ParentEntity { get; set; } + public RelatedEntity314 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity316 - { - public int Id { get; set; } + public class RelatedEntity316 + { + public int Id { get; set; } - public RelatedEntity315 ParentEntity { get; set; } + public RelatedEntity315 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity317 - { - public int Id { get; set; } + public class RelatedEntity317 + { + public int Id { get; set; } - public RelatedEntity316 ParentEntity { get; set; } + public RelatedEntity316 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity318 - { - public int Id { get; set; } + public class RelatedEntity318 + { + public int Id { get; set; } - public RelatedEntity317 ParentEntity { get; set; } + public RelatedEntity317 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity319 - { - public int Id { get; set; } + public class RelatedEntity319 + { + public int Id { get; set; } - public RelatedEntity318 ParentEntity { get; set; } + public RelatedEntity318 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity320 - { - public int Id { get; set; } + public class RelatedEntity320 + { + public int Id { get; set; } - public RelatedEntity319 ParentEntity { get; set; } + public RelatedEntity319 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity321 - { - public int Id { get; set; } + public class RelatedEntity321 + { + public int Id { get; set; } - public RelatedEntity320 ParentEntity { get; set; } + public RelatedEntity320 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity322 - { - public int Id { get; set; } + public class RelatedEntity322 + { + public int Id { get; set; } - public RelatedEntity321 ParentEntity { get; set; } + public RelatedEntity321 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity323 - { - public int Id { get; set; } + public class RelatedEntity323 + { + public int Id { get; set; } - public RelatedEntity322 ParentEntity { get; set; } + public RelatedEntity322 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity324 - { - public int Id { get; set; } + public class RelatedEntity324 + { + public int Id { get; set; } - public RelatedEntity323 ParentEntity { get; set; } + public RelatedEntity323 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity325 - { - public int Id { get; set; } + public class RelatedEntity325 + { + public int Id { get; set; } - public RelatedEntity324 ParentEntity { get; set; } + public RelatedEntity324 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity326 - { - public int Id { get; set; } + public class RelatedEntity326 + { + public int Id { get; set; } - public RelatedEntity325 ParentEntity { get; set; } + public RelatedEntity325 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity327 - { - public int Id { get; set; } + public class RelatedEntity327 + { + public int Id { get; set; } - public RelatedEntity326 ParentEntity { get; set; } + public RelatedEntity326 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity328 - { - public int Id { get; set; } + public class RelatedEntity328 + { + public int Id { get; set; } - public RelatedEntity327 ParentEntity { get; set; } + public RelatedEntity327 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity329 - { - public int Id { get; set; } + public class RelatedEntity329 + { + public int Id { get; set; } - public RelatedEntity328 ParentEntity { get; set; } + public RelatedEntity328 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity330 - { - public int Id { get; set; } + public class RelatedEntity330 + { + public int Id { get; set; } - public RelatedEntity329 ParentEntity { get; set; } + public RelatedEntity329 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity331 - { - public int Id { get; set; } + public class RelatedEntity331 + { + public int Id { get; set; } - public RelatedEntity330 ParentEntity { get; set; } + public RelatedEntity330 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity332 - { - public int Id { get; set; } + public class RelatedEntity332 + { + public int Id { get; set; } - public RelatedEntity331 ParentEntity { get; set; } + public RelatedEntity331 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity333 - { - public int Id { get; set; } + public class RelatedEntity333 + { + public int Id { get; set; } - public RelatedEntity332 ParentEntity { get; set; } + public RelatedEntity332 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity334 - { - public int Id { get; set; } + public class RelatedEntity334 + { + public int Id { get; set; } - public RelatedEntity333 ParentEntity { get; set; } + public RelatedEntity333 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity335 - { - public int Id { get; set; } + public class RelatedEntity335 + { + public int Id { get; set; } - public RelatedEntity334 ParentEntity { get; set; } + public RelatedEntity334 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity336 - { - public int Id { get; set; } + public class RelatedEntity336 + { + public int Id { get; set; } - public RelatedEntity335 ParentEntity { get; set; } + public RelatedEntity335 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity337 - { - public int Id { get; set; } + public class RelatedEntity337 + { + public int Id { get; set; } - public RelatedEntity336 ParentEntity { get; set; } + public RelatedEntity336 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity338 - { - public int Id { get; set; } + public class RelatedEntity338 + { + public int Id { get; set; } - public RelatedEntity337 ParentEntity { get; set; } + public RelatedEntity337 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity339 - { - public int Id { get; set; } + public class RelatedEntity339 + { + public int Id { get; set; } - public RelatedEntity338 ParentEntity { get; set; } + public RelatedEntity338 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity340 - { - public int Id { get; set; } + public class RelatedEntity340 + { + public int Id { get; set; } - public RelatedEntity339 ParentEntity { get; set; } + public RelatedEntity339 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity341 - { - public int Id { get; set; } + public class RelatedEntity341 + { + public int Id { get; set; } - public RelatedEntity340 ParentEntity { get; set; } + public RelatedEntity340 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity342 - { - public int Id { get; set; } + public class RelatedEntity342 + { + public int Id { get; set; } - public RelatedEntity341 ParentEntity { get; set; } + public RelatedEntity341 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity343 - { - public int Id { get; set; } + public class RelatedEntity343 + { + public int Id { get; set; } - public RelatedEntity342 ParentEntity { get; set; } + public RelatedEntity342 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity344 - { - public int Id { get; set; } + public class RelatedEntity344 + { + public int Id { get; set; } - public RelatedEntity343 ParentEntity { get; set; } + public RelatedEntity343 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity345 - { - public int Id { get; set; } + public class RelatedEntity345 + { + public int Id { get; set; } - public RelatedEntity344 ParentEntity { get; set; } + public RelatedEntity344 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity346 - { - public int Id { get; set; } + public class RelatedEntity346 + { + public int Id { get; set; } - public RelatedEntity345 ParentEntity { get; set; } + public RelatedEntity345 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity347 - { - public int Id { get; set; } + public class RelatedEntity347 + { + public int Id { get; set; } - public RelatedEntity346 ParentEntity { get; set; } + public RelatedEntity346 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity348 - { - public int Id { get; set; } + public class RelatedEntity348 + { + public int Id { get; set; } - public RelatedEntity347 ParentEntity { get; set; } + public RelatedEntity347 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity349 - { - public int Id { get; set; } + public class RelatedEntity349 + { + public int Id { get; set; } - public RelatedEntity348 ParentEntity { get; set; } + public RelatedEntity348 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity350 - { - public int Id { get; set; } + public class RelatedEntity350 + { + public int Id { get; set; } - public RelatedEntity349 ParentEntity { get; set; } + public RelatedEntity349 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity351 - { - public int Id { get; set; } + public class RelatedEntity351 + { + public int Id { get; set; } - public RelatedEntity350 ParentEntity { get; set; } + public RelatedEntity350 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity352 - { - public int Id { get; set; } + public class RelatedEntity352 + { + public int Id { get; set; } - public RelatedEntity351 ParentEntity { get; set; } + public RelatedEntity351 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity353 - { - public int Id { get; set; } + public class RelatedEntity353 + { + public int Id { get; set; } - public RelatedEntity352 ParentEntity { get; set; } + public RelatedEntity352 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity354 - { - public int Id { get; set; } + public class RelatedEntity354 + { + public int Id { get; set; } - public RelatedEntity353 ParentEntity { get; set; } + public RelatedEntity353 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity355 - { - public int Id { get; set; } + public class RelatedEntity355 + { + public int Id { get; set; } - public RelatedEntity354 ParentEntity { get; set; } + public RelatedEntity354 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity356 - { - public int Id { get; set; } + public class RelatedEntity356 + { + public int Id { get; set; } - public RelatedEntity355 ParentEntity { get; set; } + public RelatedEntity355 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity357 - { - public int Id { get; set; } + public class RelatedEntity357 + { + public int Id { get; set; } - public RelatedEntity356 ParentEntity { get; set; } + public RelatedEntity356 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity358 - { - public int Id { get; set; } + public class RelatedEntity358 + { + public int Id { get; set; } - public RelatedEntity357 ParentEntity { get; set; } + public RelatedEntity357 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity359 - { - public int Id { get; set; } + public class RelatedEntity359 + { + public int Id { get; set; } - public RelatedEntity358 ParentEntity { get; set; } + public RelatedEntity358 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity360 - { - public int Id { get; set; } + public class RelatedEntity360 + { + public int Id { get; set; } - public RelatedEntity359 ParentEntity { get; set; } + public RelatedEntity359 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity361 - { - public int Id { get; set; } + public class RelatedEntity361 + { + public int Id { get; set; } - public RelatedEntity360 ParentEntity { get; set; } + public RelatedEntity360 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity362 - { - public int Id { get; set; } + public class RelatedEntity362 + { + public int Id { get; set; } - public RelatedEntity361 ParentEntity { get; set; } + public RelatedEntity361 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity363 - { - public int Id { get; set; } + public class RelatedEntity363 + { + public int Id { get; set; } - public RelatedEntity362 ParentEntity { get; set; } + public RelatedEntity362 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity364 - { - public int Id { get; set; } + public class RelatedEntity364 + { + public int Id { get; set; } - public RelatedEntity363 ParentEntity { get; set; } + public RelatedEntity363 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity365 - { - public int Id { get; set; } + public class RelatedEntity365 + { + public int Id { get; set; } - public RelatedEntity364 ParentEntity { get; set; } + public RelatedEntity364 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity366 - { - public int Id { get; set; } + public class RelatedEntity366 + { + public int Id { get; set; } - public RelatedEntity365 ParentEntity { get; set; } + public RelatedEntity365 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity367 - { - public int Id { get; set; } + public class RelatedEntity367 + { + public int Id { get; set; } - public RelatedEntity366 ParentEntity { get; set; } + public RelatedEntity366 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity368 - { - public int Id { get; set; } + public class RelatedEntity368 + { + public int Id { get; set; } - public RelatedEntity367 ParentEntity { get; set; } + public RelatedEntity367 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity369 - { - public int Id { get; set; } + public class RelatedEntity369 + { + public int Id { get; set; } - public RelatedEntity368 ParentEntity { get; set; } + public RelatedEntity368 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity370 - { - public int Id { get; set; } + public class RelatedEntity370 + { + public int Id { get; set; } - public RelatedEntity369 ParentEntity { get; set; } + public RelatedEntity369 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity371 - { - public int Id { get; set; } + public class RelatedEntity371 + { + public int Id { get; set; } - public RelatedEntity370 ParentEntity { get; set; } + public RelatedEntity370 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity372 - { - public int Id { get; set; } + public class RelatedEntity372 + { + public int Id { get; set; } - public RelatedEntity371 ParentEntity { get; set; } + public RelatedEntity371 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity373 - { - public int Id { get; set; } + public class RelatedEntity373 + { + public int Id { get; set; } - public RelatedEntity372 ParentEntity { get; set; } + public RelatedEntity372 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity374 - { - public int Id { get; set; } + public class RelatedEntity374 + { + public int Id { get; set; } - public RelatedEntity373 ParentEntity { get; set; } + public RelatedEntity373 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity375 - { - public int Id { get; set; } + public class RelatedEntity375 + { + public int Id { get; set; } - public RelatedEntity374 ParentEntity { get; set; } + public RelatedEntity374 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity376 - { - public int Id { get; set; } + public class RelatedEntity376 + { + public int Id { get; set; } - public RelatedEntity375 ParentEntity { get; set; } + public RelatedEntity375 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity377 - { - public int Id { get; set; } + public class RelatedEntity377 + { + public int Id { get; set; } - public RelatedEntity376 ParentEntity { get; set; } + public RelatedEntity376 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity378 - { - public int Id { get; set; } + public class RelatedEntity378 + { + public int Id { get; set; } - public RelatedEntity377 ParentEntity { get; set; } + public RelatedEntity377 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity379 - { - public int Id { get; set; } + public class RelatedEntity379 + { + public int Id { get; set; } - public RelatedEntity378 ParentEntity { get; set; } + public RelatedEntity378 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity380 - { - public int Id { get; set; } + public class RelatedEntity380 + { + public int Id { get; set; } - public RelatedEntity379 ParentEntity { get; set; } + public RelatedEntity379 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity381 - { - public int Id { get; set; } + public class RelatedEntity381 + { + public int Id { get; set; } - public RelatedEntity380 ParentEntity { get; set; } + public RelatedEntity380 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity382 - { - public int Id { get; set; } + public class RelatedEntity382 + { + public int Id { get; set; } - public RelatedEntity381 ParentEntity { get; set; } + public RelatedEntity381 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity383 - { - public int Id { get; set; } + public class RelatedEntity383 + { + public int Id { get; set; } - public RelatedEntity382 ParentEntity { get; set; } + public RelatedEntity382 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity384 - { - public int Id { get; set; } + public class RelatedEntity384 + { + public int Id { get; set; } - public RelatedEntity383 ParentEntity { get; set; } + public RelatedEntity383 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity385 - { - public int Id { get; set; } + public class RelatedEntity385 + { + public int Id { get; set; } - public RelatedEntity384 ParentEntity { get; set; } + public RelatedEntity384 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity386 - { - public int Id { get; set; } + public class RelatedEntity386 + { + public int Id { get; set; } - public RelatedEntity385 ParentEntity { get; set; } + public RelatedEntity385 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity387 - { - public int Id { get; set; } + public class RelatedEntity387 + { + public int Id { get; set; } - public RelatedEntity386 ParentEntity { get; set; } + public RelatedEntity386 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity388 - { - public int Id { get; set; } + public class RelatedEntity388 + { + public int Id { get; set; } - public RelatedEntity387 ParentEntity { get; set; } + public RelatedEntity387 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity389 - { - public int Id { get; set; } + public class RelatedEntity389 + { + public int Id { get; set; } - public RelatedEntity388 ParentEntity { get; set; } + public RelatedEntity388 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity390 - { - public int Id { get; set; } + public class RelatedEntity390 + { + public int Id { get; set; } - public RelatedEntity389 ParentEntity { get; set; } + public RelatedEntity389 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity391 - { - public int Id { get; set; } + public class RelatedEntity391 + { + public int Id { get; set; } - public RelatedEntity390 ParentEntity { get; set; } + public RelatedEntity390 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity392 - { - public int Id { get; set; } + public class RelatedEntity392 + { + public int Id { get; set; } - public RelatedEntity391 ParentEntity { get; set; } + public RelatedEntity391 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity393 - { - public int Id { get; set; } + public class RelatedEntity393 + { + public int Id { get; set; } - public RelatedEntity392 ParentEntity { get; set; } + public RelatedEntity392 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity394 - { - public int Id { get; set; } + public class RelatedEntity394 + { + public int Id { get; set; } - public RelatedEntity393 ParentEntity { get; set; } + public RelatedEntity393 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity395 - { - public int Id { get; set; } + public class RelatedEntity395 + { + public int Id { get; set; } - public RelatedEntity394 ParentEntity { get; set; } + public RelatedEntity394 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity396 - { - public int Id { get; set; } + public class RelatedEntity396 + { + public int Id { get; set; } - public RelatedEntity395 ParentEntity { get; set; } + public RelatedEntity395 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity397 - { - public int Id { get; set; } + public class RelatedEntity397 + { + public int Id { get; set; } - public RelatedEntity396 ParentEntity { get; set; } + public RelatedEntity396 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity398 - { - public int Id { get; set; } + public class RelatedEntity398 + { + public int Id { get; set; } - public RelatedEntity397 ParentEntity { get; set; } + public RelatedEntity397 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity399 - { - public int Id { get; set; } + public class RelatedEntity399 + { + public int Id { get; set; } - public RelatedEntity398 ParentEntity { get; set; } + public RelatedEntity398 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity400 - { - public int Id { get; set; } + public class RelatedEntity400 + { + public int Id { get; set; } - public RelatedEntity399 ParentEntity { get; set; } + public RelatedEntity399 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity401 - { - public int Id { get; set; } + public class RelatedEntity401 + { + public int Id { get; set; } - public RelatedEntity400 ParentEntity { get; set; } + public RelatedEntity400 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity402 - { - public int Id { get; set; } + public class RelatedEntity402 + { + public int Id { get; set; } - public RelatedEntity401 ParentEntity { get; set; } + public RelatedEntity401 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity403 - { - public int Id { get; set; } + public class RelatedEntity403 + { + public int Id { get; set; } - public RelatedEntity402 ParentEntity { get; set; } + public RelatedEntity402 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity404 - { - public int Id { get; set; } + public class RelatedEntity404 + { + public int Id { get; set; } - public RelatedEntity403 ParentEntity { get; set; } + public RelatedEntity403 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity405 - { - public int Id { get; set; } + public class RelatedEntity405 + { + public int Id { get; set; } - public RelatedEntity404 ParentEntity { get; set; } + public RelatedEntity404 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity406 - { - public int Id { get; set; } + public class RelatedEntity406 + { + public int Id { get; set; } - public RelatedEntity405 ParentEntity { get; set; } + public RelatedEntity405 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity407 - { - public int Id { get; set; } + public class RelatedEntity407 + { + public int Id { get; set; } - public RelatedEntity406 ParentEntity { get; set; } + public RelatedEntity406 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity408 - { - public int Id { get; set; } + public class RelatedEntity408 + { + public int Id { get; set; } - public RelatedEntity407 ParentEntity { get; set; } + public RelatedEntity407 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity409 - { - public int Id { get; set; } + public class RelatedEntity409 + { + public int Id { get; set; } - public RelatedEntity408 ParentEntity { get; set; } + public RelatedEntity408 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity410 - { - public int Id { get; set; } + public class RelatedEntity410 + { + public int Id { get; set; } - public RelatedEntity409 ParentEntity { get; set; } + public RelatedEntity409 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity411 - { - public int Id { get; set; } + public class RelatedEntity411 + { + public int Id { get; set; } - public RelatedEntity410 ParentEntity { get; set; } + public RelatedEntity410 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity412 - { - public int Id { get; set; } + public class RelatedEntity412 + { + public int Id { get; set; } - public RelatedEntity411 ParentEntity { get; set; } + public RelatedEntity411 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity413 - { - public int Id { get; set; } + public class RelatedEntity413 + { + public int Id { get; set; } - public RelatedEntity412 ParentEntity { get; set; } + public RelatedEntity412 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity414 - { - public int Id { get; set; } + public class RelatedEntity414 + { + public int Id { get; set; } - public RelatedEntity413 ParentEntity { get; set; } + public RelatedEntity413 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity415 - { - public int Id { get; set; } + public class RelatedEntity415 + { + public int Id { get; set; } - public RelatedEntity414 ParentEntity { get; set; } + public RelatedEntity414 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity416 - { - public int Id { get; set; } + public class RelatedEntity416 + { + public int Id { get; set; } - public RelatedEntity415 ParentEntity { get; set; } + public RelatedEntity415 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity417 - { - public int Id { get; set; } + public class RelatedEntity417 + { + public int Id { get; set; } - public RelatedEntity416 ParentEntity { get; set; } + public RelatedEntity416 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity418 - { - public int Id { get; set; } + public class RelatedEntity418 + { + public int Id { get; set; } - public RelatedEntity417 ParentEntity { get; set; } + public RelatedEntity417 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity419 - { - public int Id { get; set; } + public class RelatedEntity419 + { + public int Id { get; set; } - public RelatedEntity418 ParentEntity { get; set; } + public RelatedEntity418 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity420 - { - public int Id { get; set; } + public class RelatedEntity420 + { + public int Id { get; set; } - public RelatedEntity419 ParentEntity { get; set; } + public RelatedEntity419 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity421 - { - public int Id { get; set; } + public class RelatedEntity421 + { + public int Id { get; set; } - public RelatedEntity420 ParentEntity { get; set; } + public RelatedEntity420 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity422 - { - public int Id { get; set; } + public class RelatedEntity422 + { + public int Id { get; set; } - public RelatedEntity421 ParentEntity { get; set; } + public RelatedEntity421 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity423 - { - public int Id { get; set; } + public class RelatedEntity423 + { + public int Id { get; set; } - public RelatedEntity422 ParentEntity { get; set; } + public RelatedEntity422 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity424 - { - public int Id { get; set; } + public class RelatedEntity424 + { + public int Id { get; set; } - public RelatedEntity423 ParentEntity { get; set; } + public RelatedEntity423 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity425 - { - public int Id { get; set; } + public class RelatedEntity425 + { + public int Id { get; set; } - public RelatedEntity424 ParentEntity { get; set; } + public RelatedEntity424 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity426 - { - public int Id { get; set; } + public class RelatedEntity426 + { + public int Id { get; set; } - public RelatedEntity425 ParentEntity { get; set; } + public RelatedEntity425 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity427 - { - public int Id { get; set; } + public class RelatedEntity427 + { + public int Id { get; set; } - public RelatedEntity426 ParentEntity { get; set; } + public RelatedEntity426 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity428 - { - public int Id { get; set; } + public class RelatedEntity428 + { + public int Id { get; set; } - public RelatedEntity427 ParentEntity { get; set; } + public RelatedEntity427 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity429 - { - public int Id { get; set; } + public class RelatedEntity429 + { + public int Id { get; set; } - public RelatedEntity428 ParentEntity { get; set; } + public RelatedEntity428 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity430 - { - public int Id { get; set; } + public class RelatedEntity430 + { + public int Id { get; set; } - public RelatedEntity429 ParentEntity { get; set; } + public RelatedEntity429 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity431 - { - public int Id { get; set; } + public class RelatedEntity431 + { + public int Id { get; set; } - public RelatedEntity430 ParentEntity { get; set; } + public RelatedEntity430 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity432 - { - public int Id { get; set; } + public class RelatedEntity432 + { + public int Id { get; set; } - public RelatedEntity431 ParentEntity { get; set; } + public RelatedEntity431 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity433 - { - public int Id { get; set; } + public class RelatedEntity433 + { + public int Id { get; set; } - public RelatedEntity432 ParentEntity { get; set; } + public RelatedEntity432 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity434 - { - public int Id { get; set; } + public class RelatedEntity434 + { + public int Id { get; set; } - public RelatedEntity433 ParentEntity { get; set; } + public RelatedEntity433 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity435 - { - public int Id { get; set; } + public class RelatedEntity435 + { + public int Id { get; set; } - public RelatedEntity434 ParentEntity { get; set; } + public RelatedEntity434 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity436 - { - public int Id { get; set; } + public class RelatedEntity436 + { + public int Id { get; set; } - public RelatedEntity435 ParentEntity { get; set; } + public RelatedEntity435 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity437 - { - public int Id { get; set; } + public class RelatedEntity437 + { + public int Id { get; set; } - public RelatedEntity436 ParentEntity { get; set; } + public RelatedEntity436 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity438 - { - public int Id { get; set; } + public class RelatedEntity438 + { + public int Id { get; set; } - public RelatedEntity437 ParentEntity { get; set; } + public RelatedEntity437 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity439 - { - public int Id { get; set; } + public class RelatedEntity439 + { + public int Id { get; set; } - public RelatedEntity438 ParentEntity { get; set; } + public RelatedEntity438 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity440 - { - public int Id { get; set; } + public class RelatedEntity440 + { + public int Id { get; set; } - public RelatedEntity439 ParentEntity { get; set; } + public RelatedEntity439 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity441 - { - public int Id { get; set; } + public class RelatedEntity441 + { + public int Id { get; set; } - public RelatedEntity440 ParentEntity { get; set; } + public RelatedEntity440 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity442 - { - public int Id { get; set; } + public class RelatedEntity442 + { + public int Id { get; set; } - public RelatedEntity441 ParentEntity { get; set; } + public RelatedEntity441 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity443 - { - public int Id { get; set; } + public class RelatedEntity443 + { + public int Id { get; set; } - public RelatedEntity442 ParentEntity { get; set; } + public RelatedEntity442 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity444 - { - public int Id { get; set; } + public class RelatedEntity444 + { + public int Id { get; set; } - public RelatedEntity443 ParentEntity { get; set; } + public RelatedEntity443 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity445 - { - public int Id { get; set; } + public class RelatedEntity445 + { + public int Id { get; set; } - public RelatedEntity444 ParentEntity { get; set; } + public RelatedEntity444 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity446 - { - public int Id { get; set; } + public class RelatedEntity446 + { + public int Id { get; set; } - public RelatedEntity445 ParentEntity { get; set; } + public RelatedEntity445 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity447 - { - public int Id { get; set; } + public class RelatedEntity447 + { + public int Id { get; set; } - public RelatedEntity446 ParentEntity { get; set; } + public RelatedEntity446 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity448 - { - public int Id { get; set; } + public class RelatedEntity448 + { + public int Id { get; set; } - public RelatedEntity447 ParentEntity { get; set; } + public RelatedEntity447 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity449 - { - public int Id { get; set; } + public class RelatedEntity449 + { + public int Id { get; set; } - public RelatedEntity448 ParentEntity { get; set; } + public RelatedEntity448 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity450 - { - public int Id { get; set; } + public class RelatedEntity450 + { + public int Id { get; set; } - public RelatedEntity449 ParentEntity { get; set; } + public RelatedEntity449 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity451 - { - public int Id { get; set; } + public class RelatedEntity451 + { + public int Id { get; set; } - public RelatedEntity450 ParentEntity { get; set; } + public RelatedEntity450 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity452 - { - public int Id { get; set; } + public class RelatedEntity452 + { + public int Id { get; set; } - public RelatedEntity451 ParentEntity { get; set; } + public RelatedEntity451 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity453 - { - public int Id { get; set; } + public class RelatedEntity453 + { + public int Id { get; set; } - public RelatedEntity452 ParentEntity { get; set; } + public RelatedEntity452 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity454 - { - public int Id { get; set; } + public class RelatedEntity454 + { + public int Id { get; set; } - public RelatedEntity453 ParentEntity { get; set; } + public RelatedEntity453 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity455 - { - public int Id { get; set; } + public class RelatedEntity455 + { + public int Id { get; set; } - public RelatedEntity454 ParentEntity { get; set; } + public RelatedEntity454 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity456 - { - public int Id { get; set; } + public class RelatedEntity456 + { + public int Id { get; set; } - public RelatedEntity455 ParentEntity { get; set; } + public RelatedEntity455 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity457 - { - public int Id { get; set; } + public class RelatedEntity457 + { + public int Id { get; set; } - public RelatedEntity456 ParentEntity { get; set; } + public RelatedEntity456 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity458 - { - public int Id { get; set; } + public class RelatedEntity458 + { + public int Id { get; set; } - public RelatedEntity457 ParentEntity { get; set; } + public RelatedEntity457 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity459 - { - public int Id { get; set; } + public class RelatedEntity459 + { + public int Id { get; set; } - public RelatedEntity458 ParentEntity { get; set; } + public RelatedEntity458 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity460 - { - public int Id { get; set; } + public class RelatedEntity460 + { + public int Id { get; set; } - public RelatedEntity459 ParentEntity { get; set; } + public RelatedEntity459 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity461 - { - public int Id { get; set; } + public class RelatedEntity461 + { + public int Id { get; set; } - public RelatedEntity460 ParentEntity { get; set; } + public RelatedEntity460 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity462 - { - public int Id { get; set; } + public class RelatedEntity462 + { + public int Id { get; set; } - public RelatedEntity461 ParentEntity { get; set; } + public RelatedEntity461 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity463 - { - public int Id { get; set; } + public class RelatedEntity463 + { + public int Id { get; set; } - public RelatedEntity462 ParentEntity { get; set; } + public RelatedEntity462 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity464 - { - public int Id { get; set; } + public class RelatedEntity464 + { + public int Id { get; set; } - public RelatedEntity463 ParentEntity { get; set; } + public RelatedEntity463 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity465 - { - public int Id { get; set; } + public class RelatedEntity465 + { + public int Id { get; set; } - public RelatedEntity464 ParentEntity { get; set; } + public RelatedEntity464 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity466 - { - public int Id { get; set; } + public class RelatedEntity466 + { + public int Id { get; set; } - public RelatedEntity465 ParentEntity { get; set; } + public RelatedEntity465 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity467 - { - public int Id { get; set; } + public class RelatedEntity467 + { + public int Id { get; set; } - public RelatedEntity466 ParentEntity { get; set; } + public RelatedEntity466 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity468 - { - public int Id { get; set; } + public class RelatedEntity468 + { + public int Id { get; set; } - public RelatedEntity467 ParentEntity { get; set; } + public RelatedEntity467 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity469 - { - public int Id { get; set; } + public class RelatedEntity469 + { + public int Id { get; set; } - public RelatedEntity468 ParentEntity { get; set; } + public RelatedEntity468 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity470 - { - public int Id { get; set; } + public class RelatedEntity470 + { + public int Id { get; set; } - public RelatedEntity469 ParentEntity { get; set; } + public RelatedEntity469 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity471 - { - public int Id { get; set; } + public class RelatedEntity471 + { + public int Id { get; set; } - public RelatedEntity470 ParentEntity { get; set; } + public RelatedEntity470 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity472 - { - public int Id { get; set; } + public class RelatedEntity472 + { + public int Id { get; set; } - public RelatedEntity471 ParentEntity { get; set; } + public RelatedEntity471 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity473 - { - public int Id { get; set; } + public class RelatedEntity473 + { + public int Id { get; set; } - public RelatedEntity472 ParentEntity { get; set; } + public RelatedEntity472 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity474 - { - public int Id { get; set; } + public class RelatedEntity474 + { + public int Id { get; set; } - public RelatedEntity473 ParentEntity { get; set; } + public RelatedEntity473 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity475 - { - public int Id { get; set; } + public class RelatedEntity475 + { + public int Id { get; set; } - public RelatedEntity474 ParentEntity { get; set; } + public RelatedEntity474 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity476 - { - public int Id { get; set; } + public class RelatedEntity476 + { + public int Id { get; set; } - public RelatedEntity475 ParentEntity { get; set; } + public RelatedEntity475 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity477 - { - public int Id { get; set; } + public class RelatedEntity477 + { + public int Id { get; set; } - public RelatedEntity476 ParentEntity { get; set; } + public RelatedEntity476 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity478 - { - public int Id { get; set; } + public class RelatedEntity478 + { + public int Id { get; set; } - public RelatedEntity477 ParentEntity { get; set; } + public RelatedEntity477 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity479 - { - public int Id { get; set; } + public class RelatedEntity479 + { + public int Id { get; set; } - public RelatedEntity478 ParentEntity { get; set; } + public RelatedEntity478 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity480 - { - public int Id { get; set; } + public class RelatedEntity480 + { + public int Id { get; set; } - public RelatedEntity479 ParentEntity { get; set; } + public RelatedEntity479 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity481 - { - public int Id { get; set; } + public class RelatedEntity481 + { + public int Id { get; set; } - public RelatedEntity480 ParentEntity { get; set; } + public RelatedEntity480 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity482 - { - public int Id { get; set; } + public class RelatedEntity482 + { + public int Id { get; set; } - public RelatedEntity481 ParentEntity { get; set; } + public RelatedEntity481 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity483 - { - public int Id { get; set; } + public class RelatedEntity483 + { + public int Id { get; set; } - public RelatedEntity482 ParentEntity { get; set; } + public RelatedEntity482 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity484 - { - public int Id { get; set; } + public class RelatedEntity484 + { + public int Id { get; set; } - public RelatedEntity483 ParentEntity { get; set; } + public RelatedEntity483 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity485 - { - public int Id { get; set; } + public class RelatedEntity485 + { + public int Id { get; set; } - public RelatedEntity484 ParentEntity { get; set; } + public RelatedEntity484 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity486 - { - public int Id { get; set; } + public class RelatedEntity486 + { + public int Id { get; set; } - public RelatedEntity485 ParentEntity { get; set; } + public RelatedEntity485 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity487 - { - public int Id { get; set; } + public class RelatedEntity487 + { + public int Id { get; set; } - public RelatedEntity486 ParentEntity { get; set; } + public RelatedEntity486 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity488 - { - public int Id { get; set; } + public class RelatedEntity488 + { + public int Id { get; set; } - public RelatedEntity487 ParentEntity { get; set; } + public RelatedEntity487 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity489 - { - public int Id { get; set; } + public class RelatedEntity489 + { + public int Id { get; set; } - public RelatedEntity488 ParentEntity { get; set; } + public RelatedEntity488 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity490 - { - public int Id { get; set; } + public class RelatedEntity490 + { + public int Id { get; set; } - public RelatedEntity489 ParentEntity { get; set; } + public RelatedEntity489 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity491 - { - public int Id { get; set; } + public class RelatedEntity491 + { + public int Id { get; set; } - public RelatedEntity490 ParentEntity { get; set; } + public RelatedEntity490 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity492 - { - public int Id { get; set; } + public class RelatedEntity492 + { + public int Id { get; set; } - public RelatedEntity491 ParentEntity { get; set; } + public RelatedEntity491 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity493 - { - public int Id { get; set; } + public class RelatedEntity493 + { + public int Id { get; set; } - public RelatedEntity492 ParentEntity { get; set; } + public RelatedEntity492 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity494 - { - public int Id { get; set; } + public class RelatedEntity494 + { + public int Id { get; set; } - public RelatedEntity493 ParentEntity { get; set; } + public RelatedEntity493 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity495 - { - public int Id { get; set; } + public class RelatedEntity495 + { + public int Id { get; set; } - public RelatedEntity494 ParentEntity { get; set; } + public RelatedEntity494 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity496 - { - public int Id { get; set; } + public class RelatedEntity496 + { + public int Id { get; set; } - public RelatedEntity495 ParentEntity { get; set; } + public RelatedEntity495 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity497 - { - public int Id { get; set; } + public class RelatedEntity497 + { + public int Id { get; set; } - public RelatedEntity496 ParentEntity { get; set; } + public RelatedEntity496 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity498 - { - public int Id { get; set; } + public class RelatedEntity498 + { + public int Id { get; set; } - public RelatedEntity497 ParentEntity { get; set; } + public RelatedEntity497 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity499 - { - public int Id { get; set; } + public class RelatedEntity499 + { + public int Id { get; set; } - public RelatedEntity498 ParentEntity { get; set; } + public RelatedEntity498 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity500 - { - public int Id { get; set; } + public class RelatedEntity500 + { + public int Id { get; set; } - public RelatedEntity499 ParentEntity { get; set; } + public RelatedEntity499 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity501 - { - public int Id { get; set; } + public class RelatedEntity501 + { + public int Id { get; set; } - public RelatedEntity500 ParentEntity { get; set; } + public RelatedEntity500 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity502 - { - public int Id { get; set; } + public class RelatedEntity502 + { + public int Id { get; set; } - public RelatedEntity501 ParentEntity { get; set; } + public RelatedEntity501 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity503 - { - public int Id { get; set; } + public class RelatedEntity503 + { + public int Id { get; set; } - public RelatedEntity502 ParentEntity { get; set; } + public RelatedEntity502 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity504 - { - public int Id { get; set; } + public class RelatedEntity504 + { + public int Id { get; set; } - public RelatedEntity503 ParentEntity { get; set; } + public RelatedEntity503 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity505 - { - public int Id { get; set; } + public class RelatedEntity505 + { + public int Id { get; set; } - public RelatedEntity504 ParentEntity { get; set; } + public RelatedEntity504 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity506 - { - public int Id { get; set; } + public class RelatedEntity506 + { + public int Id { get; set; } - public RelatedEntity505 ParentEntity { get; set; } + public RelatedEntity505 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity507 - { - public int Id { get; set; } + public class RelatedEntity507 + { + public int Id { get; set; } - public RelatedEntity506 ParentEntity { get; set; } + public RelatedEntity506 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity508 - { - public int Id { get; set; } + public class RelatedEntity508 + { + public int Id { get; set; } - public RelatedEntity507 ParentEntity { get; set; } + public RelatedEntity507 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity509 - { - public int Id { get; set; } + public class RelatedEntity509 + { + public int Id { get; set; } - public RelatedEntity508 ParentEntity { get; set; } + public RelatedEntity508 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity510 - { - public int Id { get; set; } + public class RelatedEntity510 + { + public int Id { get; set; } - public RelatedEntity509 ParentEntity { get; set; } + public RelatedEntity509 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity511 - { - public int Id { get; set; } + public class RelatedEntity511 + { + public int Id { get; set; } - public RelatedEntity510 ParentEntity { get; set; } + public RelatedEntity510 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity512 - { - public int Id { get; set; } + public class RelatedEntity512 + { + public int Id { get; set; } - public RelatedEntity511 ParentEntity { get; set; } + public RelatedEntity511 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity513 - { - public int Id { get; set; } + public class RelatedEntity513 + { + public int Id { get; set; } - public RelatedEntity512 ParentEntity { get; set; } + public RelatedEntity512 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity514 - { - public int Id { get; set; } + public class RelatedEntity514 + { + public int Id { get; set; } - public RelatedEntity513 ParentEntity { get; set; } + public RelatedEntity513 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity515 - { - public int Id { get; set; } + public class RelatedEntity515 + { + public int Id { get; set; } - public RelatedEntity514 ParentEntity { get; set; } + public RelatedEntity514 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity516 - { - public int Id { get; set; } + public class RelatedEntity516 + { + public int Id { get; set; } - public RelatedEntity515 ParentEntity { get; set; } + public RelatedEntity515 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity517 - { - public int Id { get; set; } + public class RelatedEntity517 + { + public int Id { get; set; } - public RelatedEntity516 ParentEntity { get; set; } + public RelatedEntity516 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity518 - { - public int Id { get; set; } + public class RelatedEntity518 + { + public int Id { get; set; } - public RelatedEntity517 ParentEntity { get; set; } + public RelatedEntity517 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity519 - { - public int Id { get; set; } + public class RelatedEntity519 + { + public int Id { get; set; } - public RelatedEntity518 ParentEntity { get; set; } + public RelatedEntity518 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity520 - { - public int Id { get; set; } + public class RelatedEntity520 + { + public int Id { get; set; } - public RelatedEntity519 ParentEntity { get; set; } + public RelatedEntity519 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity521 - { - public int Id { get; set; } + public class RelatedEntity521 + { + public int Id { get; set; } - public RelatedEntity520 ParentEntity { get; set; } + public RelatedEntity520 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity522 - { - public int Id { get; set; } + public class RelatedEntity522 + { + public int Id { get; set; } - public RelatedEntity521 ParentEntity { get; set; } + public RelatedEntity521 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity523 - { - public int Id { get; set; } + public class RelatedEntity523 + { + public int Id { get; set; } - public RelatedEntity522 ParentEntity { get; set; } + public RelatedEntity522 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity524 - { - public int Id { get; set; } + public class RelatedEntity524 + { + public int Id { get; set; } - public RelatedEntity523 ParentEntity { get; set; } + public RelatedEntity523 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity525 - { - public int Id { get; set; } + public class RelatedEntity525 + { + public int Id { get; set; } - public RelatedEntity524 ParentEntity { get; set; } + public RelatedEntity524 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity526 - { - public int Id { get; set; } + public class RelatedEntity526 + { + public int Id { get; set; } - public RelatedEntity525 ParentEntity { get; set; } + public RelatedEntity525 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity527 - { - public int Id { get; set; } + public class RelatedEntity527 + { + public int Id { get; set; } - public RelatedEntity526 ParentEntity { get; set; } + public RelatedEntity526 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity528 - { - public int Id { get; set; } + public class RelatedEntity528 + { + public int Id { get; set; } - public RelatedEntity527 ParentEntity { get; set; } + public RelatedEntity527 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity529 - { - public int Id { get; set; } + public class RelatedEntity529 + { + public int Id { get; set; } - public RelatedEntity528 ParentEntity { get; set; } + public RelatedEntity528 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity530 - { - public int Id { get; set; } + public class RelatedEntity530 + { + public int Id { get; set; } - public RelatedEntity529 ParentEntity { get; set; } + public RelatedEntity529 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity531 - { - public int Id { get; set; } + public class RelatedEntity531 + { + public int Id { get; set; } - public RelatedEntity530 ParentEntity { get; set; } + public RelatedEntity530 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity532 - { - public int Id { get; set; } + public class RelatedEntity532 + { + public int Id { get; set; } - public RelatedEntity531 ParentEntity { get; set; } + public RelatedEntity531 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity533 - { - public int Id { get; set; } + public class RelatedEntity533 + { + public int Id { get; set; } - public RelatedEntity532 ParentEntity { get; set; } + public RelatedEntity532 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity534 - { - public int Id { get; set; } + public class RelatedEntity534 + { + public int Id { get; set; } - public RelatedEntity533 ParentEntity { get; set; } + public RelatedEntity533 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity535 - { - public int Id { get; set; } + public class RelatedEntity535 + { + public int Id { get; set; } - public RelatedEntity534 ParentEntity { get; set; } + public RelatedEntity534 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity536 - { - public int Id { get; set; } + public class RelatedEntity536 + { + public int Id { get; set; } - public RelatedEntity535 ParentEntity { get; set; } + public RelatedEntity535 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity537 - { - public int Id { get; set; } + public class RelatedEntity537 + { + public int Id { get; set; } - public RelatedEntity536 ParentEntity { get; set; } + public RelatedEntity536 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity538 - { - public int Id { get; set; } + public class RelatedEntity538 + { + public int Id { get; set; } - public RelatedEntity537 ParentEntity { get; set; } + public RelatedEntity537 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity539 - { - public int Id { get; set; } + public class RelatedEntity539 + { + public int Id { get; set; } - public RelatedEntity538 ParentEntity { get; set; } + public RelatedEntity538 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity540 - { - public int Id { get; set; } + public class RelatedEntity540 + { + public int Id { get; set; } - public RelatedEntity539 ParentEntity { get; set; } + public RelatedEntity539 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity541 - { - public int Id { get; set; } + public class RelatedEntity541 + { + public int Id { get; set; } - public RelatedEntity540 ParentEntity { get; set; } + public RelatedEntity540 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity542 - { - public int Id { get; set; } + public class RelatedEntity542 + { + public int Id { get; set; } - public RelatedEntity541 ParentEntity { get; set; } + public RelatedEntity541 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity543 - { - public int Id { get; set; } + public class RelatedEntity543 + { + public int Id { get; set; } - public RelatedEntity542 ParentEntity { get; set; } + public RelatedEntity542 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity544 - { - public int Id { get; set; } + public class RelatedEntity544 + { + public int Id { get; set; } - public RelatedEntity543 ParentEntity { get; set; } + public RelatedEntity543 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity545 - { - public int Id { get; set; } + public class RelatedEntity545 + { + public int Id { get; set; } - public RelatedEntity544 ParentEntity { get; set; } + public RelatedEntity544 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity546 - { - public int Id { get; set; } + public class RelatedEntity546 + { + public int Id { get; set; } - public RelatedEntity545 ParentEntity { get; set; } + public RelatedEntity545 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity547 - { - public int Id { get; set; } + public class RelatedEntity547 + { + public int Id { get; set; } - public RelatedEntity546 ParentEntity { get; set; } + public RelatedEntity546 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity548 - { - public int Id { get; set; } + public class RelatedEntity548 + { + public int Id { get; set; } - public RelatedEntity547 ParentEntity { get; set; } + public RelatedEntity547 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity549 - { - public int Id { get; set; } + public class RelatedEntity549 + { + public int Id { get; set; } - public RelatedEntity548 ParentEntity { get; set; } + public RelatedEntity548 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity550 - { - public int Id { get; set; } + public class RelatedEntity550 + { + public int Id { get; set; } - public RelatedEntity549 ParentEntity { get; set; } + public RelatedEntity549 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity551 - { - public int Id { get; set; } + public class RelatedEntity551 + { + public int Id { get; set; } - public RelatedEntity550 ParentEntity { get; set; } + public RelatedEntity550 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity552 - { - public int Id { get; set; } + public class RelatedEntity552 + { + public int Id { get; set; } - public RelatedEntity551 ParentEntity { get; set; } + public RelatedEntity551 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity553 - { - public int Id { get; set; } + public class RelatedEntity553 + { + public int Id { get; set; } - public RelatedEntity552 ParentEntity { get; set; } + public RelatedEntity552 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity554 - { - public int Id { get; set; } + public class RelatedEntity554 + { + public int Id { get; set; } - public RelatedEntity553 ParentEntity { get; set; } + public RelatedEntity553 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity555 - { - public int Id { get; set; } + public class RelatedEntity555 + { + public int Id { get; set; } - public RelatedEntity554 ParentEntity { get; set; } + public RelatedEntity554 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity556 - { - public int Id { get; set; } + public class RelatedEntity556 + { + public int Id { get; set; } - public RelatedEntity555 ParentEntity { get; set; } + public RelatedEntity555 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity557 - { - public int Id { get; set; } + public class RelatedEntity557 + { + public int Id { get; set; } - public RelatedEntity556 ParentEntity { get; set; } + public RelatedEntity556 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity558 - { - public int Id { get; set; } + public class RelatedEntity558 + { + public int Id { get; set; } - public RelatedEntity557 ParentEntity { get; set; } + public RelatedEntity557 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity559 - { - public int Id { get; set; } + public class RelatedEntity559 + { + public int Id { get; set; } - public RelatedEntity558 ParentEntity { get; set; } + public RelatedEntity558 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity560 - { - public int Id { get; set; } + public class RelatedEntity560 + { + public int Id { get; set; } - public RelatedEntity559 ParentEntity { get; set; } + public RelatedEntity559 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity561 - { - public int Id { get; set; } + public class RelatedEntity561 + { + public int Id { get; set; } - public RelatedEntity560 ParentEntity { get; set; } + public RelatedEntity560 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity562 - { - public int Id { get; set; } + public class RelatedEntity562 + { + public int Id { get; set; } - public RelatedEntity561 ParentEntity { get; set; } + public RelatedEntity561 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity563 - { - public int Id { get; set; } + public class RelatedEntity563 + { + public int Id { get; set; } - public RelatedEntity562 ParentEntity { get; set; } + public RelatedEntity562 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity564 - { - public int Id { get; set; } + public class RelatedEntity564 + { + public int Id { get; set; } - public RelatedEntity563 ParentEntity { get; set; } + public RelatedEntity563 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity565 - { - public int Id { get; set; } + public class RelatedEntity565 + { + public int Id { get; set; } - public RelatedEntity564 ParentEntity { get; set; } + public RelatedEntity564 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity566 - { - public int Id { get; set; } + public class RelatedEntity566 + { + public int Id { get; set; } - public RelatedEntity565 ParentEntity { get; set; } + public RelatedEntity565 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity567 - { - public int Id { get; set; } + public class RelatedEntity567 + { + public int Id { get; set; } - public RelatedEntity566 ParentEntity { get; set; } + public RelatedEntity566 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity568 - { - public int Id { get; set; } + public class RelatedEntity568 + { + public int Id { get; set; } - public RelatedEntity567 ParentEntity { get; set; } + public RelatedEntity567 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity569 - { - public int Id { get; set; } + public class RelatedEntity569 + { + public int Id { get; set; } - public RelatedEntity568 ParentEntity { get; set; } + public RelatedEntity568 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity570 - { - public int Id { get; set; } + public class RelatedEntity570 + { + public int Id { get; set; } - public RelatedEntity569 ParentEntity { get; set; } + public RelatedEntity569 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity571 - { - public int Id { get; set; } + public class RelatedEntity571 + { + public int Id { get; set; } - public RelatedEntity570 ParentEntity { get; set; } + public RelatedEntity570 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity572 - { - public int Id { get; set; } + public class RelatedEntity572 + { + public int Id { get; set; } - public RelatedEntity571 ParentEntity { get; set; } + public RelatedEntity571 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity573 - { - public int Id { get; set; } + public class RelatedEntity573 + { + public int Id { get; set; } - public RelatedEntity572 ParentEntity { get; set; } + public RelatedEntity572 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity574 - { - public int Id { get; set; } + public class RelatedEntity574 + { + public int Id { get; set; } - public RelatedEntity573 ParentEntity { get; set; } + public RelatedEntity573 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity575 - { - public int Id { get; set; } + public class RelatedEntity575 + { + public int Id { get; set; } - public RelatedEntity574 ParentEntity { get; set; } + public RelatedEntity574 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity576 - { - public int Id { get; set; } + public class RelatedEntity576 + { + public int Id { get; set; } - public RelatedEntity575 ParentEntity { get; set; } + public RelatedEntity575 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity577 - { - public int Id { get; set; } + public class RelatedEntity577 + { + public int Id { get; set; } - public RelatedEntity576 ParentEntity { get; set; } + public RelatedEntity576 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity578 - { - public int Id { get; set; } + public class RelatedEntity578 + { + public int Id { get; set; } - public RelatedEntity577 ParentEntity { get; set; } + public RelatedEntity577 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity579 - { - public int Id { get; set; } + public class RelatedEntity579 + { + public int Id { get; set; } - public RelatedEntity578 ParentEntity { get; set; } + public RelatedEntity578 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity580 - { - public int Id { get; set; } + public class RelatedEntity580 + { + public int Id { get; set; } - public RelatedEntity579 ParentEntity { get; set; } + public RelatedEntity579 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity581 - { - public int Id { get; set; } + public class RelatedEntity581 + { + public int Id { get; set; } - public RelatedEntity580 ParentEntity { get; set; } + public RelatedEntity580 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity582 - { - public int Id { get; set; } + public class RelatedEntity582 + { + public int Id { get; set; } - public RelatedEntity581 ParentEntity { get; set; } + public RelatedEntity581 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity583 - { - public int Id { get; set; } + public class RelatedEntity583 + { + public int Id { get; set; } - public RelatedEntity582 ParentEntity { get; set; } + public RelatedEntity582 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity584 - { - public int Id { get; set; } + public class RelatedEntity584 + { + public int Id { get; set; } - public RelatedEntity583 ParentEntity { get; set; } + public RelatedEntity583 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity585 - { - public int Id { get; set; } + public class RelatedEntity585 + { + public int Id { get; set; } - public RelatedEntity584 ParentEntity { get; set; } + public RelatedEntity584 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity586 - { - public int Id { get; set; } + public class RelatedEntity586 + { + public int Id { get; set; } - public RelatedEntity585 ParentEntity { get; set; } + public RelatedEntity585 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity587 - { - public int Id { get; set; } + public class RelatedEntity587 + { + public int Id { get; set; } - public RelatedEntity586 ParentEntity { get; set; } + public RelatedEntity586 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity588 - { - public int Id { get; set; } + public class RelatedEntity588 + { + public int Id { get; set; } - public RelatedEntity587 ParentEntity { get; set; } + public RelatedEntity587 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity589 - { - public int Id { get; set; } + public class RelatedEntity589 + { + public int Id { get; set; } - public RelatedEntity588 ParentEntity { get; set; } + public RelatedEntity588 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity590 - { - public int Id { get; set; } + public class RelatedEntity590 + { + public int Id { get; set; } - public RelatedEntity589 ParentEntity { get; set; } + public RelatedEntity589 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity591 - { - public int Id { get; set; } + public class RelatedEntity591 + { + public int Id { get; set; } - public RelatedEntity590 ParentEntity { get; set; } + public RelatedEntity590 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity592 - { - public int Id { get; set; } + public class RelatedEntity592 + { + public int Id { get; set; } - public RelatedEntity591 ParentEntity { get; set; } + public RelatedEntity591 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity593 - { - public int Id { get; set; } + public class RelatedEntity593 + { + public int Id { get; set; } - public RelatedEntity592 ParentEntity { get; set; } + public RelatedEntity592 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity594 - { - public int Id { get; set; } + public class RelatedEntity594 + { + public int Id { get; set; } - public RelatedEntity593 ParentEntity { get; set; } + public RelatedEntity593 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity595 - { - public int Id { get; set; } + public class RelatedEntity595 + { + public int Id { get; set; } - public RelatedEntity594 ParentEntity { get; set; } + public RelatedEntity594 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity596 - { - public int Id { get; set; } + public class RelatedEntity596 + { + public int Id { get; set; } - public RelatedEntity595 ParentEntity { get; set; } + public RelatedEntity595 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity597 - { - public int Id { get; set; } + public class RelatedEntity597 + { + public int Id { get; set; } - public RelatedEntity596 ParentEntity { get; set; } + public RelatedEntity596 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity598 - { - public int Id { get; set; } + public class RelatedEntity598 + { + public int Id { get; set; } - public RelatedEntity597 ParentEntity { get; set; } + public RelatedEntity597 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity599 - { - public int Id { get; set; } + public class RelatedEntity599 + { + public int Id { get; set; } - public RelatedEntity598 ParentEntity { get; set; } + public RelatedEntity598 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity600 - { - public int Id { get; set; } + public class RelatedEntity600 + { + public int Id { get; set; } - public RelatedEntity599 ParentEntity { get; set; } + public RelatedEntity599 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity601 - { - public int Id { get; set; } + public class RelatedEntity601 + { + public int Id { get; set; } - public RelatedEntity600 ParentEntity { get; set; } + public RelatedEntity600 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity602 - { - public int Id { get; set; } + public class RelatedEntity602 + { + public int Id { get; set; } - public RelatedEntity601 ParentEntity { get; set; } + public RelatedEntity601 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity603 - { - public int Id { get; set; } + public class RelatedEntity603 + { + public int Id { get; set; } - public RelatedEntity602 ParentEntity { get; set; } + public RelatedEntity602 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity604 - { - public int Id { get; set; } + public class RelatedEntity604 + { + public int Id { get; set; } - public RelatedEntity603 ParentEntity { get; set; } + public RelatedEntity603 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity605 - { - public int Id { get; set; } + public class RelatedEntity605 + { + public int Id { get; set; } - public RelatedEntity604 ParentEntity { get; set; } + public RelatedEntity604 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity606 - { - public int Id { get; set; } + public class RelatedEntity606 + { + public int Id { get; set; } - public RelatedEntity605 ParentEntity { get; set; } + public RelatedEntity605 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity607 - { - public int Id { get; set; } + public class RelatedEntity607 + { + public int Id { get; set; } - public RelatedEntity606 ParentEntity { get; set; } + public RelatedEntity606 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity608 - { - public int Id { get; set; } + public class RelatedEntity608 + { + public int Id { get; set; } - public RelatedEntity607 ParentEntity { get; set; } + public RelatedEntity607 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity609 - { - public int Id { get; set; } + public class RelatedEntity609 + { + public int Id { get; set; } - public RelatedEntity608 ParentEntity { get; set; } + public RelatedEntity608 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity610 - { - public int Id { get; set; } + public class RelatedEntity610 + { + public int Id { get; set; } - public RelatedEntity609 ParentEntity { get; set; } + public RelatedEntity609 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity611 - { - public int Id { get; set; } + public class RelatedEntity611 + { + public int Id { get; set; } - public RelatedEntity610 ParentEntity { get; set; } + public RelatedEntity610 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity612 - { - public int Id { get; set; } + public class RelatedEntity612 + { + public int Id { get; set; } - public RelatedEntity611 ParentEntity { get; set; } + public RelatedEntity611 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity613 - { - public int Id { get; set; } + public class RelatedEntity613 + { + public int Id { get; set; } - public RelatedEntity612 ParentEntity { get; set; } + public RelatedEntity612 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity614 - { - public int Id { get; set; } + public class RelatedEntity614 + { + public int Id { get; set; } - public RelatedEntity613 ParentEntity { get; set; } + public RelatedEntity613 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity615 - { - public int Id { get; set; } + public class RelatedEntity615 + { + public int Id { get; set; } - public RelatedEntity614 ParentEntity { get; set; } + public RelatedEntity614 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity616 - { - public int Id { get; set; } + public class RelatedEntity616 + { + public int Id { get; set; } - public RelatedEntity615 ParentEntity { get; set; } + public RelatedEntity615 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity617 - { - public int Id { get; set; } + public class RelatedEntity617 + { + public int Id { get; set; } - public RelatedEntity616 ParentEntity { get; set; } + public RelatedEntity616 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity618 - { - public int Id { get; set; } + public class RelatedEntity618 + { + public int Id { get; set; } - public RelatedEntity617 ParentEntity { get; set; } + public RelatedEntity617 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity619 - { - public int Id { get; set; } + public class RelatedEntity619 + { + public int Id { get; set; } - public RelatedEntity618 ParentEntity { get; set; } + public RelatedEntity618 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity620 - { - public int Id { get; set; } + public class RelatedEntity620 + { + public int Id { get; set; } - public RelatedEntity619 ParentEntity { get; set; } + public RelatedEntity619 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity621 - { - public int Id { get; set; } + public class RelatedEntity621 + { + public int Id { get; set; } - public RelatedEntity620 ParentEntity { get; set; } + public RelatedEntity620 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity622 - { - public int Id { get; set; } + public class RelatedEntity622 + { + public int Id { get; set; } - public RelatedEntity621 ParentEntity { get; set; } + public RelatedEntity621 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity623 - { - public int Id { get; set; } + public class RelatedEntity623 + { + public int Id { get; set; } - public RelatedEntity622 ParentEntity { get; set; } + public RelatedEntity622 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity624 - { - public int Id { get; set; } + public class RelatedEntity624 + { + public int Id { get; set; } - public RelatedEntity623 ParentEntity { get; set; } + public RelatedEntity623 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity625 - { - public int Id { get; set; } + public class RelatedEntity625 + { + public int Id { get; set; } - public RelatedEntity624 ParentEntity { get; set; } + public RelatedEntity624 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity626 - { - public int Id { get; set; } + public class RelatedEntity626 + { + public int Id { get; set; } - public RelatedEntity625 ParentEntity { get; set; } + public RelatedEntity625 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity627 - { - public int Id { get; set; } + public class RelatedEntity627 + { + public int Id { get; set; } - public RelatedEntity626 ParentEntity { get; set; } + public RelatedEntity626 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity628 - { - public int Id { get; set; } + public class RelatedEntity628 + { + public int Id { get; set; } - public RelatedEntity627 ParentEntity { get; set; } + public RelatedEntity627 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity629 - { - public int Id { get; set; } + public class RelatedEntity629 + { + public int Id { get; set; } - public RelatedEntity628 ParentEntity { get; set; } + public RelatedEntity628 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity630 - { - public int Id { get; set; } + public class RelatedEntity630 + { + public int Id { get; set; } - public RelatedEntity629 ParentEntity { get; set; } + public RelatedEntity629 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity631 - { - public int Id { get; set; } + public class RelatedEntity631 + { + public int Id { get; set; } - public RelatedEntity630 ParentEntity { get; set; } + public RelatedEntity630 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity632 - { - public int Id { get; set; } + public class RelatedEntity632 + { + public int Id { get; set; } - public RelatedEntity631 ParentEntity { get; set; } + public RelatedEntity631 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity633 - { - public int Id { get; set; } + public class RelatedEntity633 + { + public int Id { get; set; } - public RelatedEntity632 ParentEntity { get; set; } + public RelatedEntity632 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity634 - { - public int Id { get; set; } + public class RelatedEntity634 + { + public int Id { get; set; } - public RelatedEntity633 ParentEntity { get; set; } + public RelatedEntity633 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity635 - { - public int Id { get; set; } + public class RelatedEntity635 + { + public int Id { get; set; } - public RelatedEntity634 ParentEntity { get; set; } + public RelatedEntity634 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity636 - { - public int Id { get; set; } + public class RelatedEntity636 + { + public int Id { get; set; } - public RelatedEntity635 ParentEntity { get; set; } + public RelatedEntity635 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity637 - { - public int Id { get; set; } + public class RelatedEntity637 + { + public int Id { get; set; } - public RelatedEntity636 ParentEntity { get; set; } + public RelatedEntity636 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity638 - { - public int Id { get; set; } + public class RelatedEntity638 + { + public int Id { get; set; } - public RelatedEntity637 ParentEntity { get; set; } + public RelatedEntity637 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity639 - { - public int Id { get; set; } + public class RelatedEntity639 + { + public int Id { get; set; } - public RelatedEntity638 ParentEntity { get; set; } + public RelatedEntity638 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity640 - { - public int Id { get; set; } + public class RelatedEntity640 + { + public int Id { get; set; } - public RelatedEntity639 ParentEntity { get; set; } + public RelatedEntity639 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity641 - { - public int Id { get; set; } + public class RelatedEntity641 + { + public int Id { get; set; } - public RelatedEntity640 ParentEntity { get; set; } + public RelatedEntity640 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity642 - { - public int Id { get; set; } + public class RelatedEntity642 + { + public int Id { get; set; } - public RelatedEntity641 ParentEntity { get; set; } + public RelatedEntity641 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity643 - { - public int Id { get; set; } + public class RelatedEntity643 + { + public int Id { get; set; } - public RelatedEntity642 ParentEntity { get; set; } + public RelatedEntity642 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity644 - { - public int Id { get; set; } + public class RelatedEntity644 + { + public int Id { get; set; } - public RelatedEntity643 ParentEntity { get; set; } + public RelatedEntity643 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity645 - { - public int Id { get; set; } + public class RelatedEntity645 + { + public int Id { get; set; } - public RelatedEntity644 ParentEntity { get; set; } + public RelatedEntity644 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity646 - { - public int Id { get; set; } + public class RelatedEntity646 + { + public int Id { get; set; } - public RelatedEntity645 ParentEntity { get; set; } + public RelatedEntity645 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity647 - { - public int Id { get; set; } + public class RelatedEntity647 + { + public int Id { get; set; } - public RelatedEntity646 ParentEntity { get; set; } + public RelatedEntity646 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity648 - { - public int Id { get; set; } + public class RelatedEntity648 + { + public int Id { get; set; } - public RelatedEntity647 ParentEntity { get; set; } + public RelatedEntity647 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity649 - { - public int Id { get; set; } + public class RelatedEntity649 + { + public int Id { get; set; } - public RelatedEntity648 ParentEntity { get; set; } + public RelatedEntity648 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity650 - { - public int Id { get; set; } + public class RelatedEntity650 + { + public int Id { get; set; } - public RelatedEntity649 ParentEntity { get; set; } + public RelatedEntity649 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity651 - { - public int Id { get; set; } + public class RelatedEntity651 + { + public int Id { get; set; } - public RelatedEntity650 ParentEntity { get; set; } + public RelatedEntity650 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity652 - { - public int Id { get; set; } + public class RelatedEntity652 + { + public int Id { get; set; } - public RelatedEntity651 ParentEntity { get; set; } + public RelatedEntity651 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity653 - { - public int Id { get; set; } + public class RelatedEntity653 + { + public int Id { get; set; } - public RelatedEntity652 ParentEntity { get; set; } + public RelatedEntity652 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity654 - { - public int Id { get; set; } + public class RelatedEntity654 + { + public int Id { get; set; } - public RelatedEntity653 ParentEntity { get; set; } + public RelatedEntity653 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity655 - { - public int Id { get; set; } + public class RelatedEntity655 + { + public int Id { get; set; } - public RelatedEntity654 ParentEntity { get; set; } + public RelatedEntity654 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity656 - { - public int Id { get; set; } + public class RelatedEntity656 + { + public int Id { get; set; } - public RelatedEntity655 ParentEntity { get; set; } + public RelatedEntity655 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity657 - { - public int Id { get; set; } + public class RelatedEntity657 + { + public int Id { get; set; } - public RelatedEntity656 ParentEntity { get; set; } + public RelatedEntity656 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity658 - { - public int Id { get; set; } + public class RelatedEntity658 + { + public int Id { get; set; } - public RelatedEntity657 ParentEntity { get; set; } + public RelatedEntity657 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity659 - { - public int Id { get; set; } + public class RelatedEntity659 + { + public int Id { get; set; } - public RelatedEntity658 ParentEntity { get; set; } + public RelatedEntity658 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity660 - { - public int Id { get; set; } + public class RelatedEntity660 + { + public int Id { get; set; } - public RelatedEntity659 ParentEntity { get; set; } + public RelatedEntity659 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity661 - { - public int Id { get; set; } + public class RelatedEntity661 + { + public int Id { get; set; } - public RelatedEntity660 ParentEntity { get; set; } + public RelatedEntity660 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity662 - { - public int Id { get; set; } + public class RelatedEntity662 + { + public int Id { get; set; } - public RelatedEntity661 ParentEntity { get; set; } + public RelatedEntity661 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity663 - { - public int Id { get; set; } + public class RelatedEntity663 + { + public int Id { get; set; } - public RelatedEntity662 ParentEntity { get; set; } + public RelatedEntity662 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity664 - { - public int Id { get; set; } + public class RelatedEntity664 + { + public int Id { get; set; } - public RelatedEntity663 ParentEntity { get; set; } + public RelatedEntity663 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity665 - { - public int Id { get; set; } + public class RelatedEntity665 + { + public int Id { get; set; } - public RelatedEntity664 ParentEntity { get; set; } + public RelatedEntity664 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity666 - { - public int Id { get; set; } + public class RelatedEntity666 + { + public int Id { get; set; } - public RelatedEntity665 ParentEntity { get; set; } + public RelatedEntity665 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity667 - { - public int Id { get; set; } + public class RelatedEntity667 + { + public int Id { get; set; } - public RelatedEntity666 ParentEntity { get; set; } + public RelatedEntity666 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity668 - { - public int Id { get; set; } + public class RelatedEntity668 + { + public int Id { get; set; } - public RelatedEntity667 ParentEntity { get; set; } + public RelatedEntity667 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity669 - { - public int Id { get; set; } + public class RelatedEntity669 + { + public int Id { get; set; } - public RelatedEntity668 ParentEntity { get; set; } + public RelatedEntity668 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity670 - { - public int Id { get; set; } + public class RelatedEntity670 + { + public int Id { get; set; } - public RelatedEntity669 ParentEntity { get; set; } + public RelatedEntity669 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity671 - { - public int Id { get; set; } + public class RelatedEntity671 + { + public int Id { get; set; } - public RelatedEntity670 ParentEntity { get; set; } + public RelatedEntity670 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity672 - { - public int Id { get; set; } + public class RelatedEntity672 + { + public int Id { get; set; } - public RelatedEntity671 ParentEntity { get; set; } + public RelatedEntity671 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity673 - { - public int Id { get; set; } + public class RelatedEntity673 + { + public int Id { get; set; } - public RelatedEntity672 ParentEntity { get; set; } + public RelatedEntity672 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity674 - { - public int Id { get; set; } + public class RelatedEntity674 + { + public int Id { get; set; } - public RelatedEntity673 ParentEntity { get; set; } + public RelatedEntity673 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity675 - { - public int Id { get; set; } + public class RelatedEntity675 + { + public int Id { get; set; } - public RelatedEntity674 ParentEntity { get; set; } + public RelatedEntity674 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity676 - { - public int Id { get; set; } + public class RelatedEntity676 + { + public int Id { get; set; } - public RelatedEntity675 ParentEntity { get; set; } + public RelatedEntity675 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity677 - { - public int Id { get; set; } + public class RelatedEntity677 + { + public int Id { get; set; } - public RelatedEntity676 ParentEntity { get; set; } + public RelatedEntity676 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity678 - { - public int Id { get; set; } + public class RelatedEntity678 + { + public int Id { get; set; } - public RelatedEntity677 ParentEntity { get; set; } + public RelatedEntity677 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity679 - { - public int Id { get; set; } + public class RelatedEntity679 + { + public int Id { get; set; } - public RelatedEntity678 ParentEntity { get; set; } + public RelatedEntity678 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity680 - { - public int Id { get; set; } + public class RelatedEntity680 + { + public int Id { get; set; } - public RelatedEntity679 ParentEntity { get; set; } + public RelatedEntity679 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity681 - { - public int Id { get; set; } + public class RelatedEntity681 + { + public int Id { get; set; } - public RelatedEntity680 ParentEntity { get; set; } + public RelatedEntity680 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity682 - { - public int Id { get; set; } + public class RelatedEntity682 + { + public int Id { get; set; } - public RelatedEntity681 ParentEntity { get; set; } + public RelatedEntity681 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity683 - { - public int Id { get; set; } + public class RelatedEntity683 + { + public int Id { get; set; } - public RelatedEntity682 ParentEntity { get; set; } + public RelatedEntity682 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity684 - { - public int Id { get; set; } + public class RelatedEntity684 + { + public int Id { get; set; } - public RelatedEntity683 ParentEntity { get; set; } + public RelatedEntity683 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity685 - { - public int Id { get; set; } + public class RelatedEntity685 + { + public int Id { get; set; } - public RelatedEntity684 ParentEntity { get; set; } + public RelatedEntity684 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity686 - { - public int Id { get; set; } + public class RelatedEntity686 + { + public int Id { get; set; } - public RelatedEntity685 ParentEntity { get; set; } + public RelatedEntity685 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity687 - { - public int Id { get; set; } + public class RelatedEntity687 + { + public int Id { get; set; } - public RelatedEntity686 ParentEntity { get; set; } + public RelatedEntity686 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity688 - { - public int Id { get; set; } + public class RelatedEntity688 + { + public int Id { get; set; } - public RelatedEntity687 ParentEntity { get; set; } + public RelatedEntity687 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity689 - { - public int Id { get; set; } + public class RelatedEntity689 + { + public int Id { get; set; } - public RelatedEntity688 ParentEntity { get; set; } + public RelatedEntity688 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity690 - { - public int Id { get; set; } + public class RelatedEntity690 + { + public int Id { get; set; } - public RelatedEntity689 ParentEntity { get; set; } + public RelatedEntity689 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity691 - { - public int Id { get; set; } + public class RelatedEntity691 + { + public int Id { get; set; } - public RelatedEntity690 ParentEntity { get; set; } + public RelatedEntity690 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity692 - { - public int Id { get; set; } + public class RelatedEntity692 + { + public int Id { get; set; } - public RelatedEntity691 ParentEntity { get; set; } + public RelatedEntity691 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity693 - { - public int Id { get; set; } + public class RelatedEntity693 + { + public int Id { get; set; } - public RelatedEntity692 ParentEntity { get; set; } + public RelatedEntity692 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity694 - { - public int Id { get; set; } + public class RelatedEntity694 + { + public int Id { get; set; } - public RelatedEntity693 ParentEntity { get; set; } + public RelatedEntity693 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity695 - { - public int Id { get; set; } + public class RelatedEntity695 + { + public int Id { get; set; } - public RelatedEntity694 ParentEntity { get; set; } + public RelatedEntity694 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity696 - { - public int Id { get; set; } + public class RelatedEntity696 + { + public int Id { get; set; } - public RelatedEntity695 ParentEntity { get; set; } + public RelatedEntity695 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity697 - { - public int Id { get; set; } + public class RelatedEntity697 + { + public int Id { get; set; } - public RelatedEntity696 ParentEntity { get; set; } + public RelatedEntity696 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity698 - { - public int Id { get; set; } + public class RelatedEntity698 + { + public int Id { get; set; } - public RelatedEntity697 ParentEntity { get; set; } + public RelatedEntity697 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity699 - { - public int Id { get; set; } + public class RelatedEntity699 + { + public int Id { get; set; } - public RelatedEntity698 ParentEntity { get; set; } + public RelatedEntity698 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity700 - { - public int Id { get; set; } + public class RelatedEntity700 + { + public int Id { get; set; } - public RelatedEntity699 ParentEntity { get; set; } + public RelatedEntity699 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity701 - { - public int Id { get; set; } + public class RelatedEntity701 + { + public int Id { get; set; } - public RelatedEntity700 ParentEntity { get; set; } + public RelatedEntity700 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity702 - { - public int Id { get; set; } + public class RelatedEntity702 + { + public int Id { get; set; } - public RelatedEntity701 ParentEntity { get; set; } + public RelatedEntity701 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity703 - { - public int Id { get; set; } + public class RelatedEntity703 + { + public int Id { get; set; } - public RelatedEntity702 ParentEntity { get; set; } + public RelatedEntity702 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity704 - { - public int Id { get; set; } + public class RelatedEntity704 + { + public int Id { get; set; } - public RelatedEntity703 ParentEntity { get; set; } + public RelatedEntity703 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity705 - { - public int Id { get; set; } + public class RelatedEntity705 + { + public int Id { get; set; } - public RelatedEntity704 ParentEntity { get; set; } + public RelatedEntity704 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity706 - { - public int Id { get; set; } + public class RelatedEntity706 + { + public int Id { get; set; } - public RelatedEntity705 ParentEntity { get; set; } + public RelatedEntity705 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity707 - { - public int Id { get; set; } + public class RelatedEntity707 + { + public int Id { get; set; } - public RelatedEntity706 ParentEntity { get; set; } + public RelatedEntity706 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity708 - { - public int Id { get; set; } + public class RelatedEntity708 + { + public int Id { get; set; } - public RelatedEntity707 ParentEntity { get; set; } + public RelatedEntity707 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity709 - { - public int Id { get; set; } + public class RelatedEntity709 + { + public int Id { get; set; } - public RelatedEntity708 ParentEntity { get; set; } + public RelatedEntity708 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity710 - { - public int Id { get; set; } + public class RelatedEntity710 + { + public int Id { get; set; } - public RelatedEntity709 ParentEntity { get; set; } + public RelatedEntity709 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity711 - { - public int Id { get; set; } + public class RelatedEntity711 + { + public int Id { get; set; } - public RelatedEntity710 ParentEntity { get; set; } + public RelatedEntity710 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity712 - { - public int Id { get; set; } + public class RelatedEntity712 + { + public int Id { get; set; } - public RelatedEntity711 ParentEntity { get; set; } + public RelatedEntity711 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity713 - { - public int Id { get; set; } + public class RelatedEntity713 + { + public int Id { get; set; } - public RelatedEntity712 ParentEntity { get; set; } + public RelatedEntity712 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity714 - { - public int Id { get; set; } + public class RelatedEntity714 + { + public int Id { get; set; } - public RelatedEntity713 ParentEntity { get; set; } + public RelatedEntity713 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity715 - { - public int Id { get; set; } + public class RelatedEntity715 + { + public int Id { get; set; } - public RelatedEntity714 ParentEntity { get; set; } + public RelatedEntity714 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity716 - { - public int Id { get; set; } + public class RelatedEntity716 + { + public int Id { get; set; } - public RelatedEntity715 ParentEntity { get; set; } + public RelatedEntity715 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity717 - { - public int Id { get; set; } + public class RelatedEntity717 + { + public int Id { get; set; } - public RelatedEntity716 ParentEntity { get; set; } + public RelatedEntity716 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity718 - { - public int Id { get; set; } + public class RelatedEntity718 + { + public int Id { get; set; } - public RelatedEntity717 ParentEntity { get; set; } + public RelatedEntity717 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity719 - { - public int Id { get; set; } + public class RelatedEntity719 + { + public int Id { get; set; } - public RelatedEntity718 ParentEntity { get; set; } + public RelatedEntity718 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity720 - { - public int Id { get; set; } + public class RelatedEntity720 + { + public int Id { get; set; } - public RelatedEntity719 ParentEntity { get; set; } + public RelatedEntity719 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity721 - { - public int Id { get; set; } + public class RelatedEntity721 + { + public int Id { get; set; } - public RelatedEntity720 ParentEntity { get; set; } + public RelatedEntity720 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity722 - { - public int Id { get; set; } + public class RelatedEntity722 + { + public int Id { get; set; } - public RelatedEntity721 ParentEntity { get; set; } + public RelatedEntity721 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity723 - { - public int Id { get; set; } + public class RelatedEntity723 + { + public int Id { get; set; } - public RelatedEntity722 ParentEntity { get; set; } + public RelatedEntity722 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity724 - { - public int Id { get; set; } + public class RelatedEntity724 + { + public int Id { get; set; } - public RelatedEntity723 ParentEntity { get; set; } + public RelatedEntity723 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity725 - { - public int Id { get; set; } + public class RelatedEntity725 + { + public int Id { get; set; } - public RelatedEntity724 ParentEntity { get; set; } + public RelatedEntity724 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity726 - { - public int Id { get; set; } + public class RelatedEntity726 + { + public int Id { get; set; } - public RelatedEntity725 ParentEntity { get; set; } + public RelatedEntity725 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity727 - { - public int Id { get; set; } + public class RelatedEntity727 + { + public int Id { get; set; } - public RelatedEntity726 ParentEntity { get; set; } + public RelatedEntity726 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity728 - { - public int Id { get; set; } + public class RelatedEntity728 + { + public int Id { get; set; } - public RelatedEntity727 ParentEntity { get; set; } + public RelatedEntity727 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity729 - { - public int Id { get; set; } + public class RelatedEntity729 + { + public int Id { get; set; } - public RelatedEntity728 ParentEntity { get; set; } + public RelatedEntity728 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity730 - { - public int Id { get; set; } + public class RelatedEntity730 + { + public int Id { get; set; } - public RelatedEntity729 ParentEntity { get; set; } + public RelatedEntity729 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity731 - { - public int Id { get; set; } + public class RelatedEntity731 + { + public int Id { get; set; } - public RelatedEntity730 ParentEntity { get; set; } + public RelatedEntity730 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity732 - { - public int Id { get; set; } + public class RelatedEntity732 + { + public int Id { get; set; } - public RelatedEntity731 ParentEntity { get; set; } + public RelatedEntity731 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity733 - { - public int Id { get; set; } + public class RelatedEntity733 + { + public int Id { get; set; } - public RelatedEntity732 ParentEntity { get; set; } + public RelatedEntity732 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity734 - { - public int Id { get; set; } + public class RelatedEntity734 + { + public int Id { get; set; } - public RelatedEntity733 ParentEntity { get; set; } + public RelatedEntity733 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity735 - { - public int Id { get; set; } + public class RelatedEntity735 + { + public int Id { get; set; } - public RelatedEntity734 ParentEntity { get; set; } + public RelatedEntity734 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity736 - { - public int Id { get; set; } + public class RelatedEntity736 + { + public int Id { get; set; } - public RelatedEntity735 ParentEntity { get; set; } + public RelatedEntity735 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity737 - { - public int Id { get; set; } + public class RelatedEntity737 + { + public int Id { get; set; } - public RelatedEntity736 ParentEntity { get; set; } + public RelatedEntity736 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity738 - { - public int Id { get; set; } + public class RelatedEntity738 + { + public int Id { get; set; } - public RelatedEntity737 ParentEntity { get; set; } + public RelatedEntity737 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity739 - { - public int Id { get; set; } + public class RelatedEntity739 + { + public int Id { get; set; } - public RelatedEntity738 ParentEntity { get; set; } + public RelatedEntity738 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity740 - { - public int Id { get; set; } + public class RelatedEntity740 + { + public int Id { get; set; } - public RelatedEntity739 ParentEntity { get; set; } + public RelatedEntity739 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity741 - { - public int Id { get; set; } + public class RelatedEntity741 + { + public int Id { get; set; } - public RelatedEntity740 ParentEntity { get; set; } + public RelatedEntity740 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity742 - { - public int Id { get; set; } + public class RelatedEntity742 + { + public int Id { get; set; } - public RelatedEntity741 ParentEntity { get; set; } + public RelatedEntity741 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity743 - { - public int Id { get; set; } + public class RelatedEntity743 + { + public int Id { get; set; } - public RelatedEntity742 ParentEntity { get; set; } + public RelatedEntity742 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity744 - { - public int Id { get; set; } + public class RelatedEntity744 + { + public int Id { get; set; } - public RelatedEntity743 ParentEntity { get; set; } + public RelatedEntity743 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity745 - { - public int Id { get; set; } + public class RelatedEntity745 + { + public int Id { get; set; } - public RelatedEntity744 ParentEntity { get; set; } + public RelatedEntity744 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity746 - { - public int Id { get; set; } + public class RelatedEntity746 + { + public int Id { get; set; } - public RelatedEntity745 ParentEntity { get; set; } + public RelatedEntity745 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity747 - { - public int Id { get; set; } + public class RelatedEntity747 + { + public int Id { get; set; } - public RelatedEntity746 ParentEntity { get; set; } + public RelatedEntity746 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity748 - { - public int Id { get; set; } + public class RelatedEntity748 + { + public int Id { get; set; } - public RelatedEntity747 ParentEntity { get; set; } + public RelatedEntity747 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity749 - { - public int Id { get; set; } + public class RelatedEntity749 + { + public int Id { get; set; } - public RelatedEntity748 ParentEntity { get; set; } + public RelatedEntity748 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity750 - { - public int Id { get; set; } + public class RelatedEntity750 + { + public int Id { get; set; } - public RelatedEntity749 ParentEntity { get; set; } + public RelatedEntity749 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity751 - { - public int Id { get; set; } + public class RelatedEntity751 + { + public int Id { get; set; } - public RelatedEntity750 ParentEntity { get; set; } + public RelatedEntity750 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity752 - { - public int Id { get; set; } + public class RelatedEntity752 + { + public int Id { get; set; } - public RelatedEntity751 ParentEntity { get; set; } + public RelatedEntity751 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity753 - { - public int Id { get; set; } + public class RelatedEntity753 + { + public int Id { get; set; } - public RelatedEntity752 ParentEntity { get; set; } + public RelatedEntity752 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity754 - { - public int Id { get; set; } + public class RelatedEntity754 + { + public int Id { get; set; } - public RelatedEntity753 ParentEntity { get; set; } + public RelatedEntity753 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity755 - { - public int Id { get; set; } + public class RelatedEntity755 + { + public int Id { get; set; } - public RelatedEntity754 ParentEntity { get; set; } + public RelatedEntity754 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity756 - { - public int Id { get; set; } + public class RelatedEntity756 + { + public int Id { get; set; } - public RelatedEntity755 ParentEntity { get; set; } + public RelatedEntity755 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity757 - { - public int Id { get; set; } + public class RelatedEntity757 + { + public int Id { get; set; } - public RelatedEntity756 ParentEntity { get; set; } + public RelatedEntity756 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity758 - { - public int Id { get; set; } + public class RelatedEntity758 + { + public int Id { get; set; } - public RelatedEntity757 ParentEntity { get; set; } + public RelatedEntity757 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity759 - { - public int Id { get; set; } + public class RelatedEntity759 + { + public int Id { get; set; } - public RelatedEntity758 ParentEntity { get; set; } + public RelatedEntity758 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity760 - { - public int Id { get; set; } + public class RelatedEntity760 + { + public int Id { get; set; } - public RelatedEntity759 ParentEntity { get; set; } + public RelatedEntity759 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity761 - { - public int Id { get; set; } + public class RelatedEntity761 + { + public int Id { get; set; } - public RelatedEntity760 ParentEntity { get; set; } + public RelatedEntity760 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity762 - { - public int Id { get; set; } + public class RelatedEntity762 + { + public int Id { get; set; } - public RelatedEntity761 ParentEntity { get; set; } + public RelatedEntity761 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity763 - { - public int Id { get; set; } + public class RelatedEntity763 + { + public int Id { get; set; } - public RelatedEntity762 ParentEntity { get; set; } + public RelatedEntity762 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity764 - { - public int Id { get; set; } + public class RelatedEntity764 + { + public int Id { get; set; } - public RelatedEntity763 ParentEntity { get; set; } + public RelatedEntity763 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity765 - { - public int Id { get; set; } + public class RelatedEntity765 + { + public int Id { get; set; } - public RelatedEntity764 ParentEntity { get; set; } + public RelatedEntity764 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity766 - { - public int Id { get; set; } + public class RelatedEntity766 + { + public int Id { get; set; } - public RelatedEntity765 ParentEntity { get; set; } + public RelatedEntity765 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity767 - { - public int Id { get; set; } + public class RelatedEntity767 + { + public int Id { get; set; } - public RelatedEntity766 ParentEntity { get; set; } + public RelatedEntity766 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity768 - { - public int Id { get; set; } + public class RelatedEntity768 + { + public int Id { get; set; } - public RelatedEntity767 ParentEntity { get; set; } + public RelatedEntity767 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity769 - { - public int Id { get; set; } + public class RelatedEntity769 + { + public int Id { get; set; } - public RelatedEntity768 ParentEntity { get; set; } + public RelatedEntity768 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity770 - { - public int Id { get; set; } + public class RelatedEntity770 + { + public int Id { get; set; } - public RelatedEntity769 ParentEntity { get; set; } + public RelatedEntity769 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity771 - { - public int Id { get; set; } + public class RelatedEntity771 + { + public int Id { get; set; } - public RelatedEntity770 ParentEntity { get; set; } + public RelatedEntity770 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity772 - { - public int Id { get; set; } + public class RelatedEntity772 + { + public int Id { get; set; } - public RelatedEntity771 ParentEntity { get; set; } + public RelatedEntity771 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity773 - { - public int Id { get; set; } + public class RelatedEntity773 + { + public int Id { get; set; } - public RelatedEntity772 ParentEntity { get; set; } + public RelatedEntity772 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity774 - { - public int Id { get; set; } + public class RelatedEntity774 + { + public int Id { get; set; } - public RelatedEntity773 ParentEntity { get; set; } + public RelatedEntity773 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity775 - { - public int Id { get; set; } + public class RelatedEntity775 + { + public int Id { get; set; } - public RelatedEntity774 ParentEntity { get; set; } + public RelatedEntity774 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity776 - { - public int Id { get; set; } + public class RelatedEntity776 + { + public int Id { get; set; } - public RelatedEntity775 ParentEntity { get; set; } + public RelatedEntity775 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity777 - { - public int Id { get; set; } + public class RelatedEntity777 + { + public int Id { get; set; } - public RelatedEntity776 ParentEntity { get; set; } + public RelatedEntity776 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity778 - { - public int Id { get; set; } + public class RelatedEntity778 + { + public int Id { get; set; } - public RelatedEntity777 ParentEntity { get; set; } + public RelatedEntity777 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity779 - { - public int Id { get; set; } + public class RelatedEntity779 + { + public int Id { get; set; } - public RelatedEntity778 ParentEntity { get; set; } + public RelatedEntity778 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity780 - { - public int Id { get; set; } + public class RelatedEntity780 + { + public int Id { get; set; } - public RelatedEntity779 ParentEntity { get; set; } + public RelatedEntity779 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity781 - { - public int Id { get; set; } + public class RelatedEntity781 + { + public int Id { get; set; } - public RelatedEntity780 ParentEntity { get; set; } + public RelatedEntity780 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity782 - { - public int Id { get; set; } + public class RelatedEntity782 + { + public int Id { get; set; } - public RelatedEntity781 ParentEntity { get; set; } + public RelatedEntity781 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity783 - { - public int Id { get; set; } + public class RelatedEntity783 + { + public int Id { get; set; } - public RelatedEntity782 ParentEntity { get; set; } + public RelatedEntity782 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity784 - { - public int Id { get; set; } + public class RelatedEntity784 + { + public int Id { get; set; } - public RelatedEntity783 ParentEntity { get; set; } + public RelatedEntity783 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity785 - { - public int Id { get; set; } + public class RelatedEntity785 + { + public int Id { get; set; } - public RelatedEntity784 ParentEntity { get; set; } + public RelatedEntity784 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity786 - { - public int Id { get; set; } + public class RelatedEntity786 + { + public int Id { get; set; } - public RelatedEntity785 ParentEntity { get; set; } + public RelatedEntity785 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity787 - { - public int Id { get; set; } + public class RelatedEntity787 + { + public int Id { get; set; } - public RelatedEntity786 ParentEntity { get; set; } + public RelatedEntity786 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity788 - { - public int Id { get; set; } + public class RelatedEntity788 + { + public int Id { get; set; } - public RelatedEntity787 ParentEntity { get; set; } + public RelatedEntity787 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity789 - { - public int Id { get; set; } + public class RelatedEntity789 + { + public int Id { get; set; } - public RelatedEntity788 ParentEntity { get; set; } + public RelatedEntity788 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity790 - { - public int Id { get; set; } + public class RelatedEntity790 + { + public int Id { get; set; } - public RelatedEntity789 ParentEntity { get; set; } + public RelatedEntity789 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity791 - { - public int Id { get; set; } + public class RelatedEntity791 + { + public int Id { get; set; } - public RelatedEntity790 ParentEntity { get; set; } + public RelatedEntity790 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity792 - { - public int Id { get; set; } + public class RelatedEntity792 + { + public int Id { get; set; } - public RelatedEntity791 ParentEntity { get; set; } + public RelatedEntity791 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity793 - { - public int Id { get; set; } + public class RelatedEntity793 + { + public int Id { get; set; } - public RelatedEntity792 ParentEntity { get; set; } + public RelatedEntity792 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity794 - { - public int Id { get; set; } + public class RelatedEntity794 + { + public int Id { get; set; } - public RelatedEntity793 ParentEntity { get; set; } + public RelatedEntity793 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity795 - { - public int Id { get; set; } + public class RelatedEntity795 + { + public int Id { get; set; } - public RelatedEntity794 ParentEntity { get; set; } + public RelatedEntity794 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity796 - { - public int Id { get; set; } + public class RelatedEntity796 + { + public int Id { get; set; } - public RelatedEntity795 ParentEntity { get; set; } + public RelatedEntity795 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity797 - { - public int Id { get; set; } + public class RelatedEntity797 + { + public int Id { get; set; } - public RelatedEntity796 ParentEntity { get; set; } + public RelatedEntity796 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity798 - { - public int Id { get; set; } + public class RelatedEntity798 + { + public int Id { get; set; } - public RelatedEntity797 ParentEntity { get; set; } + public RelatedEntity797 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity799 - { - public int Id { get; set; } + public class RelatedEntity799 + { + public int Id { get; set; } - public RelatedEntity798 ParentEntity { get; set; } + public RelatedEntity798 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity800 - { - public int Id { get; set; } + public class RelatedEntity800 + { + public int Id { get; set; } - public RelatedEntity799 ParentEntity { get; set; } + public RelatedEntity799 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity801 - { - public int Id { get; set; } + public class RelatedEntity801 + { + public int Id { get; set; } - public RelatedEntity800 ParentEntity { get; set; } + public RelatedEntity800 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity802 - { - public int Id { get; set; } + public class RelatedEntity802 + { + public int Id { get; set; } - public RelatedEntity801 ParentEntity { get; set; } + public RelatedEntity801 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity803 - { - public int Id { get; set; } + public class RelatedEntity803 + { + public int Id { get; set; } - public RelatedEntity802 ParentEntity { get; set; } + public RelatedEntity802 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity804 - { - public int Id { get; set; } + public class RelatedEntity804 + { + public int Id { get; set; } - public RelatedEntity803 ParentEntity { get; set; } + public RelatedEntity803 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity805 - { - public int Id { get; set; } + public class RelatedEntity805 + { + public int Id { get; set; } - public RelatedEntity804 ParentEntity { get; set; } + public RelatedEntity804 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity806 - { - public int Id { get; set; } + public class RelatedEntity806 + { + public int Id { get; set; } - public RelatedEntity805 ParentEntity { get; set; } + public RelatedEntity805 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity807 - { - public int Id { get; set; } + public class RelatedEntity807 + { + public int Id { get; set; } - public RelatedEntity806 ParentEntity { get; set; } + public RelatedEntity806 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity808 - { - public int Id { get; set; } + public class RelatedEntity808 + { + public int Id { get; set; } - public RelatedEntity807 ParentEntity { get; set; } + public RelatedEntity807 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity809 - { - public int Id { get; set; } + public class RelatedEntity809 + { + public int Id { get; set; } - public RelatedEntity808 ParentEntity { get; set; } + public RelatedEntity808 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity810 - { - public int Id { get; set; } + public class RelatedEntity810 + { + public int Id { get; set; } - public RelatedEntity809 ParentEntity { get; set; } + public RelatedEntity809 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity811 - { - public int Id { get; set; } + public class RelatedEntity811 + { + public int Id { get; set; } - public RelatedEntity810 ParentEntity { get; set; } + public RelatedEntity810 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity812 - { - public int Id { get; set; } + public class RelatedEntity812 + { + public int Id { get; set; } - public RelatedEntity811 ParentEntity { get; set; } + public RelatedEntity811 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity813 - { - public int Id { get; set; } + public class RelatedEntity813 + { + public int Id { get; set; } - public RelatedEntity812 ParentEntity { get; set; } + public RelatedEntity812 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity814 - { - public int Id { get; set; } + public class RelatedEntity814 + { + public int Id { get; set; } - public RelatedEntity813 ParentEntity { get; set; } + public RelatedEntity813 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity815 - { - public int Id { get; set; } + public class RelatedEntity815 + { + public int Id { get; set; } - public RelatedEntity814 ParentEntity { get; set; } + public RelatedEntity814 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity816 - { - public int Id { get; set; } + public class RelatedEntity816 + { + public int Id { get; set; } - public RelatedEntity815 ParentEntity { get; set; } + public RelatedEntity815 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity817 - { - public int Id { get; set; } + public class RelatedEntity817 + { + public int Id { get; set; } - public RelatedEntity816 ParentEntity { get; set; } + public RelatedEntity816 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity818 - { - public int Id { get; set; } + public class RelatedEntity818 + { + public int Id { get; set; } - public RelatedEntity817 ParentEntity { get; set; } + public RelatedEntity817 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity819 - { - public int Id { get; set; } + public class RelatedEntity819 + { + public int Id { get; set; } - public RelatedEntity818 ParentEntity { get; set; } + public RelatedEntity818 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity820 - { - public int Id { get; set; } + public class RelatedEntity820 + { + public int Id { get; set; } - public RelatedEntity819 ParentEntity { get; set; } + public RelatedEntity819 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity821 - { - public int Id { get; set; } + public class RelatedEntity821 + { + public int Id { get; set; } - public RelatedEntity820 ParentEntity { get; set; } + public RelatedEntity820 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity822 - { - public int Id { get; set; } + public class RelatedEntity822 + { + public int Id { get; set; } - public RelatedEntity821 ParentEntity { get; set; } + public RelatedEntity821 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity823 - { - public int Id { get; set; } + public class RelatedEntity823 + { + public int Id { get; set; } - public RelatedEntity822 ParentEntity { get; set; } + public RelatedEntity822 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity824 - { - public int Id { get; set; } + public class RelatedEntity824 + { + public int Id { get; set; } - public RelatedEntity823 ParentEntity { get; set; } + public RelatedEntity823 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity825 - { - public int Id { get; set; } + public class RelatedEntity825 + { + public int Id { get; set; } - public RelatedEntity824 ParentEntity { get; set; } + public RelatedEntity824 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity826 - { - public int Id { get; set; } + public class RelatedEntity826 + { + public int Id { get; set; } - public RelatedEntity825 ParentEntity { get; set; } + public RelatedEntity825 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity827 - { - public int Id { get; set; } + public class RelatedEntity827 + { + public int Id { get; set; } - public RelatedEntity826 ParentEntity { get; set; } + public RelatedEntity826 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity828 - { - public int Id { get; set; } + public class RelatedEntity828 + { + public int Id { get; set; } - public RelatedEntity827 ParentEntity { get; set; } + public RelatedEntity827 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity829 - { - public int Id { get; set; } + public class RelatedEntity829 + { + public int Id { get; set; } - public RelatedEntity828 ParentEntity { get; set; } + public RelatedEntity828 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity830 - { - public int Id { get; set; } + public class RelatedEntity830 + { + public int Id { get; set; } - public RelatedEntity829 ParentEntity { get; set; } + public RelatedEntity829 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity831 - { - public int Id { get; set; } + public class RelatedEntity831 + { + public int Id { get; set; } - public RelatedEntity830 ParentEntity { get; set; } + public RelatedEntity830 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity832 - { - public int Id { get; set; } + public class RelatedEntity832 + { + public int Id { get; set; } - public RelatedEntity831 ParentEntity { get; set; } + public RelatedEntity831 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity833 - { - public int Id { get; set; } + public class RelatedEntity833 + { + public int Id { get; set; } - public RelatedEntity832 ParentEntity { get; set; } + public RelatedEntity832 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity834 - { - public int Id { get; set; } + public class RelatedEntity834 + { + public int Id { get; set; } - public RelatedEntity833 ParentEntity { get; set; } + public RelatedEntity833 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity835 - { - public int Id { get; set; } + public class RelatedEntity835 + { + public int Id { get; set; } - public RelatedEntity834 ParentEntity { get; set; } + public RelatedEntity834 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity836 - { - public int Id { get; set; } + public class RelatedEntity836 + { + public int Id { get; set; } - public RelatedEntity835 ParentEntity { get; set; } + public RelatedEntity835 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity837 - { - public int Id { get; set; } + public class RelatedEntity837 + { + public int Id { get; set; } - public RelatedEntity836 ParentEntity { get; set; } + public RelatedEntity836 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity838 - { - public int Id { get; set; } + public class RelatedEntity838 + { + public int Id { get; set; } - public RelatedEntity837 ParentEntity { get; set; } + public RelatedEntity837 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity839 - { - public int Id { get; set; } + public class RelatedEntity839 + { + public int Id { get; set; } - public RelatedEntity838 ParentEntity { get; set; } + public RelatedEntity838 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity840 - { - public int Id { get; set; } + public class RelatedEntity840 + { + public int Id { get; set; } - public RelatedEntity839 ParentEntity { get; set; } + public RelatedEntity839 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity841 - { - public int Id { get; set; } + public class RelatedEntity841 + { + public int Id { get; set; } - public RelatedEntity840 ParentEntity { get; set; } + public RelatedEntity840 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity842 - { - public int Id { get; set; } + public class RelatedEntity842 + { + public int Id { get; set; } - public RelatedEntity841 ParentEntity { get; set; } + public RelatedEntity841 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity843 - { - public int Id { get; set; } + public class RelatedEntity843 + { + public int Id { get; set; } - public RelatedEntity842 ParentEntity { get; set; } + public RelatedEntity842 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity844 - { - public int Id { get; set; } + public class RelatedEntity844 + { + public int Id { get; set; } - public RelatedEntity843 ParentEntity { get; set; } + public RelatedEntity843 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity845 - { - public int Id { get; set; } + public class RelatedEntity845 + { + public int Id { get; set; } - public RelatedEntity844 ParentEntity { get; set; } + public RelatedEntity844 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity846 - { - public int Id { get; set; } + public class RelatedEntity846 + { + public int Id { get; set; } - public RelatedEntity845 ParentEntity { get; set; } + public RelatedEntity845 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity847 - { - public int Id { get; set; } + public class RelatedEntity847 + { + public int Id { get; set; } - public RelatedEntity846 ParentEntity { get; set; } + public RelatedEntity846 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity848 - { - public int Id { get; set; } + public class RelatedEntity848 + { + public int Id { get; set; } - public RelatedEntity847 ParentEntity { get; set; } + public RelatedEntity847 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity849 - { - public int Id { get; set; } + public class RelatedEntity849 + { + public int Id { get; set; } - public RelatedEntity848 ParentEntity { get; set; } + public RelatedEntity848 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity850 - { - public int Id { get; set; } + public class RelatedEntity850 + { + public int Id { get; set; } - public RelatedEntity849 ParentEntity { get; set; } + public RelatedEntity849 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity851 - { - public int Id { get; set; } + public class RelatedEntity851 + { + public int Id { get; set; } - public RelatedEntity850 ParentEntity { get; set; } + public RelatedEntity850 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity852 - { - public int Id { get; set; } + public class RelatedEntity852 + { + public int Id { get; set; } - public RelatedEntity851 ParentEntity { get; set; } + public RelatedEntity851 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity853 - { - public int Id { get; set; } + public class RelatedEntity853 + { + public int Id { get; set; } - public RelatedEntity852 ParentEntity { get; set; } + public RelatedEntity852 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity854 - { - public int Id { get; set; } + public class RelatedEntity854 + { + public int Id { get; set; } - public RelatedEntity853 ParentEntity { get; set; } + public RelatedEntity853 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity855 - { - public int Id { get; set; } + public class RelatedEntity855 + { + public int Id { get; set; } - public RelatedEntity854 ParentEntity { get; set; } + public RelatedEntity854 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity856 - { - public int Id { get; set; } + public class RelatedEntity856 + { + public int Id { get; set; } - public RelatedEntity855 ParentEntity { get; set; } + public RelatedEntity855 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity857 - { - public int Id { get; set; } + public class RelatedEntity857 + { + public int Id { get; set; } - public RelatedEntity856 ParentEntity { get; set; } + public RelatedEntity856 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity858 - { - public int Id { get; set; } + public class RelatedEntity858 + { + public int Id { get; set; } - public RelatedEntity857 ParentEntity { get; set; } + public RelatedEntity857 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity859 - { - public int Id { get; set; } + public class RelatedEntity859 + { + public int Id { get; set; } - public RelatedEntity858 ParentEntity { get; set; } + public RelatedEntity858 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity860 - { - public int Id { get; set; } + public class RelatedEntity860 + { + public int Id { get; set; } - public RelatedEntity859 ParentEntity { get; set; } + public RelatedEntity859 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity861 - { - public int Id { get; set; } + public class RelatedEntity861 + { + public int Id { get; set; } - public RelatedEntity860 ParentEntity { get; set; } + public RelatedEntity860 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity862 - { - public int Id { get; set; } + public class RelatedEntity862 + { + public int Id { get; set; } - public RelatedEntity861 ParentEntity { get; set; } + public RelatedEntity861 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity863 - { - public int Id { get; set; } + public class RelatedEntity863 + { + public int Id { get; set; } - public RelatedEntity862 ParentEntity { get; set; } + public RelatedEntity862 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity864 - { - public int Id { get; set; } + public class RelatedEntity864 + { + public int Id { get; set; } - public RelatedEntity863 ParentEntity { get; set; } + public RelatedEntity863 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity865 - { - public int Id { get; set; } + public class RelatedEntity865 + { + public int Id { get; set; } - public RelatedEntity864 ParentEntity { get; set; } + public RelatedEntity864 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity866 - { - public int Id { get; set; } + public class RelatedEntity866 + { + public int Id { get; set; } - public RelatedEntity865 ParentEntity { get; set; } + public RelatedEntity865 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity867 - { - public int Id { get; set; } + public class RelatedEntity867 + { + public int Id { get; set; } - public RelatedEntity866 ParentEntity { get; set; } + public RelatedEntity866 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity868 - { - public int Id { get; set; } + public class RelatedEntity868 + { + public int Id { get; set; } - public RelatedEntity867 ParentEntity { get; set; } + public RelatedEntity867 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity869 - { - public int Id { get; set; } + public class RelatedEntity869 + { + public int Id { get; set; } - public RelatedEntity868 ParentEntity { get; set; } + public RelatedEntity868 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity870 - { - public int Id { get; set; } + public class RelatedEntity870 + { + public int Id { get; set; } - public RelatedEntity869 ParentEntity { get; set; } + public RelatedEntity869 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity871 - { - public int Id { get; set; } + public class RelatedEntity871 + { + public int Id { get; set; } - public RelatedEntity870 ParentEntity { get; set; } + public RelatedEntity870 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity872 - { - public int Id { get; set; } + public class RelatedEntity872 + { + public int Id { get; set; } - public RelatedEntity871 ParentEntity { get; set; } + public RelatedEntity871 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity873 - { - public int Id { get; set; } + public class RelatedEntity873 + { + public int Id { get; set; } - public RelatedEntity872 ParentEntity { get; set; } + public RelatedEntity872 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity874 - { - public int Id { get; set; } + public class RelatedEntity874 + { + public int Id { get; set; } - public RelatedEntity873 ParentEntity { get; set; } + public RelatedEntity873 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity875 - { - public int Id { get; set; } + public class RelatedEntity875 + { + public int Id { get; set; } - public RelatedEntity874 ParentEntity { get; set; } + public RelatedEntity874 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity876 - { - public int Id { get; set; } + public class RelatedEntity876 + { + public int Id { get; set; } - public RelatedEntity875 ParentEntity { get; set; } + public RelatedEntity875 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity877 - { - public int Id { get; set; } + public class RelatedEntity877 + { + public int Id { get; set; } - public RelatedEntity876 ParentEntity { get; set; } + public RelatedEntity876 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity878 - { - public int Id { get; set; } + public class RelatedEntity878 + { + public int Id { get; set; } - public RelatedEntity877 ParentEntity { get; set; } + public RelatedEntity877 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity879 - { - public int Id { get; set; } + public class RelatedEntity879 + { + public int Id { get; set; } - public RelatedEntity878 ParentEntity { get; set; } + public RelatedEntity878 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity880 - { - public int Id { get; set; } + public class RelatedEntity880 + { + public int Id { get; set; } - public RelatedEntity879 ParentEntity { get; set; } + public RelatedEntity879 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity881 - { - public int Id { get; set; } + public class RelatedEntity881 + { + public int Id { get; set; } - public RelatedEntity880 ParentEntity { get; set; } + public RelatedEntity880 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity882 - { - public int Id { get; set; } + public class RelatedEntity882 + { + public int Id { get; set; } - public RelatedEntity881 ParentEntity { get; set; } + public RelatedEntity881 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity883 - { - public int Id { get; set; } + public class RelatedEntity883 + { + public int Id { get; set; } - public RelatedEntity882 ParentEntity { get; set; } + public RelatedEntity882 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity884 - { - public int Id { get; set; } + public class RelatedEntity884 + { + public int Id { get; set; } - public RelatedEntity883 ParentEntity { get; set; } + public RelatedEntity883 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity885 - { - public int Id { get; set; } + public class RelatedEntity885 + { + public int Id { get; set; } - public RelatedEntity884 ParentEntity { get; set; } + public RelatedEntity884 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity886 - { - public int Id { get; set; } + public class RelatedEntity886 + { + public int Id { get; set; } - public RelatedEntity885 ParentEntity { get; set; } + public RelatedEntity885 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity887 - { - public int Id { get; set; } + public class RelatedEntity887 + { + public int Id { get; set; } - public RelatedEntity886 ParentEntity { get; set; } + public RelatedEntity886 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity888 - { - public int Id { get; set; } + public class RelatedEntity888 + { + public int Id { get; set; } - public RelatedEntity887 ParentEntity { get; set; } + public RelatedEntity887 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity889 - { - public int Id { get; set; } + public class RelatedEntity889 + { + public int Id { get; set; } - public RelatedEntity888 ParentEntity { get; set; } + public RelatedEntity888 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity890 - { - public int Id { get; set; } + public class RelatedEntity890 + { + public int Id { get; set; } - public RelatedEntity889 ParentEntity { get; set; } + public RelatedEntity889 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity891 - { - public int Id { get; set; } + public class RelatedEntity891 + { + public int Id { get; set; } - public RelatedEntity890 ParentEntity { get; set; } + public RelatedEntity890 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity892 - { - public int Id { get; set; } + public class RelatedEntity892 + { + public int Id { get; set; } - public RelatedEntity891 ParentEntity { get; set; } + public RelatedEntity891 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity893 - { - public int Id { get; set; } + public class RelatedEntity893 + { + public int Id { get; set; } - public RelatedEntity892 ParentEntity { get; set; } + public RelatedEntity892 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity894 - { - public int Id { get; set; } + public class RelatedEntity894 + { + public int Id { get; set; } - public RelatedEntity893 ParentEntity { get; set; } + public RelatedEntity893 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity895 - { - public int Id { get; set; } + public class RelatedEntity895 + { + public int Id { get; set; } - public RelatedEntity894 ParentEntity { get; set; } + public RelatedEntity894 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity896 - { - public int Id { get; set; } + public class RelatedEntity896 + { + public int Id { get; set; } - public RelatedEntity895 ParentEntity { get; set; } + public RelatedEntity895 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity897 - { - public int Id { get; set; } + public class RelatedEntity897 + { + public int Id { get; set; } - public RelatedEntity896 ParentEntity { get; set; } + public RelatedEntity896 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity898 - { - public int Id { get; set; } + public class RelatedEntity898 + { + public int Id { get; set; } - public RelatedEntity897 ParentEntity { get; set; } + public RelatedEntity897 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity899 - { - public int Id { get; set; } + public class RelatedEntity899 + { + public int Id { get; set; } - public RelatedEntity898 ParentEntity { get; set; } + public RelatedEntity898 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity900 - { - public int Id { get; set; } + public class RelatedEntity900 + { + public int Id { get; set; } - public RelatedEntity899 ParentEntity { get; set; } + public RelatedEntity899 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity901 - { - public int Id { get; set; } + public class RelatedEntity901 + { + public int Id { get; set; } - public RelatedEntity900 ParentEntity { get; set; } + public RelatedEntity900 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity902 - { - public int Id { get; set; } + public class RelatedEntity902 + { + public int Id { get; set; } - public RelatedEntity901 ParentEntity { get; set; } + public RelatedEntity901 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity903 - { - public int Id { get; set; } + public class RelatedEntity903 + { + public int Id { get; set; } - public RelatedEntity902 ParentEntity { get; set; } + public RelatedEntity902 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity904 - { - public int Id { get; set; } + public class RelatedEntity904 + { + public int Id { get; set; } - public RelatedEntity903 ParentEntity { get; set; } + public RelatedEntity903 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity905 - { - public int Id { get; set; } + public class RelatedEntity905 + { + public int Id { get; set; } - public RelatedEntity904 ParentEntity { get; set; } + public RelatedEntity904 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity906 - { - public int Id { get; set; } + public class RelatedEntity906 + { + public int Id { get; set; } - public RelatedEntity905 ParentEntity { get; set; } + public RelatedEntity905 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity907 - { - public int Id { get; set; } + public class RelatedEntity907 + { + public int Id { get; set; } - public RelatedEntity906 ParentEntity { get; set; } + public RelatedEntity906 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity908 - { - public int Id { get; set; } + public class RelatedEntity908 + { + public int Id { get; set; } - public RelatedEntity907 ParentEntity { get; set; } + public RelatedEntity907 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity909 - { - public int Id { get; set; } + public class RelatedEntity909 + { + public int Id { get; set; } - public RelatedEntity908 ParentEntity { get; set; } + public RelatedEntity908 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity910 - { - public int Id { get; set; } + public class RelatedEntity910 + { + public int Id { get; set; } - public RelatedEntity909 ParentEntity { get; set; } + public RelatedEntity909 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity911 - { - public int Id { get; set; } + public class RelatedEntity911 + { + public int Id { get; set; } - public RelatedEntity910 ParentEntity { get; set; } + public RelatedEntity910 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity912 - { - public int Id { get; set; } + public class RelatedEntity912 + { + public int Id { get; set; } - public RelatedEntity911 ParentEntity { get; set; } + public RelatedEntity911 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity913 - { - public int Id { get; set; } + public class RelatedEntity913 + { + public int Id { get; set; } - public RelatedEntity912 ParentEntity { get; set; } + public RelatedEntity912 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity914 - { - public int Id { get; set; } + public class RelatedEntity914 + { + public int Id { get; set; } - public RelatedEntity913 ParentEntity { get; set; } + public RelatedEntity913 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity915 - { - public int Id { get; set; } + public class RelatedEntity915 + { + public int Id { get; set; } - public RelatedEntity914 ParentEntity { get; set; } + public RelatedEntity914 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity916 - { - public int Id { get; set; } + public class RelatedEntity916 + { + public int Id { get; set; } - public RelatedEntity915 ParentEntity { get; set; } + public RelatedEntity915 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity917 - { - public int Id { get; set; } + public class RelatedEntity917 + { + public int Id { get; set; } - public RelatedEntity916 ParentEntity { get; set; } + public RelatedEntity916 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity918 - { - public int Id { get; set; } + public class RelatedEntity918 + { + public int Id { get; set; } - public RelatedEntity917 ParentEntity { get; set; } + public RelatedEntity917 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity919 - { - public int Id { get; set; } + public class RelatedEntity919 + { + public int Id { get; set; } - public RelatedEntity918 ParentEntity { get; set; } + public RelatedEntity918 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity920 - { - public int Id { get; set; } + public class RelatedEntity920 + { + public int Id { get; set; } - public RelatedEntity919 ParentEntity { get; set; } + public RelatedEntity919 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity921 - { - public int Id { get; set; } + public class RelatedEntity921 + { + public int Id { get; set; } - public RelatedEntity920 ParentEntity { get; set; } + public RelatedEntity920 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity922 - { - public int Id { get; set; } + public class RelatedEntity922 + { + public int Id { get; set; } - public RelatedEntity921 ParentEntity { get; set; } + public RelatedEntity921 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity923 - { - public int Id { get; set; } + public class RelatedEntity923 + { + public int Id { get; set; } - public RelatedEntity922 ParentEntity { get; set; } + public RelatedEntity922 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity924 - { - public int Id { get; set; } + public class RelatedEntity924 + { + public int Id { get; set; } - public RelatedEntity923 ParentEntity { get; set; } + public RelatedEntity923 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity925 - { - public int Id { get; set; } + public class RelatedEntity925 + { + public int Id { get; set; } - public RelatedEntity924 ParentEntity { get; set; } + public RelatedEntity924 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity926 - { - public int Id { get; set; } + public class RelatedEntity926 + { + public int Id { get; set; } - public RelatedEntity925 ParentEntity { get; set; } + public RelatedEntity925 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity927 - { - public int Id { get; set; } + public class RelatedEntity927 + { + public int Id { get; set; } - public RelatedEntity926 ParentEntity { get; set; } + public RelatedEntity926 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity928 - { - public int Id { get; set; } + public class RelatedEntity928 + { + public int Id { get; set; } - public RelatedEntity927 ParentEntity { get; set; } + public RelatedEntity927 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity929 - { - public int Id { get; set; } + public class RelatedEntity929 + { + public int Id { get; set; } - public RelatedEntity928 ParentEntity { get; set; } + public RelatedEntity928 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity930 - { - public int Id { get; set; } + public class RelatedEntity930 + { + public int Id { get; set; } - public RelatedEntity929 ParentEntity { get; set; } + public RelatedEntity929 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity931 - { - public int Id { get; set; } + public class RelatedEntity931 + { + public int Id { get; set; } - public RelatedEntity930 ParentEntity { get; set; } + public RelatedEntity930 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity932 - { - public int Id { get; set; } + public class RelatedEntity932 + { + public int Id { get; set; } - public RelatedEntity931 ParentEntity { get; set; } + public RelatedEntity931 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity933 - { - public int Id { get; set; } + public class RelatedEntity933 + { + public int Id { get; set; } - public RelatedEntity932 ParentEntity { get; set; } + public RelatedEntity932 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity934 - { - public int Id { get; set; } + public class RelatedEntity934 + { + public int Id { get; set; } - public RelatedEntity933 ParentEntity { get; set; } + public RelatedEntity933 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity935 - { - public int Id { get; set; } + public class RelatedEntity935 + { + public int Id { get; set; } - public RelatedEntity934 ParentEntity { get; set; } + public RelatedEntity934 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity936 - { - public int Id { get; set; } + public class RelatedEntity936 + { + public int Id { get; set; } - public RelatedEntity935 ParentEntity { get; set; } + public RelatedEntity935 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity937 - { - public int Id { get; set; } + public class RelatedEntity937 + { + public int Id { get; set; } - public RelatedEntity936 ParentEntity { get; set; } + public RelatedEntity936 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity938 - { - public int Id { get; set; } + public class RelatedEntity938 + { + public int Id { get; set; } - public RelatedEntity937 ParentEntity { get; set; } + public RelatedEntity937 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity939 - { - public int Id { get; set; } + public class RelatedEntity939 + { + public int Id { get; set; } - public RelatedEntity938 ParentEntity { get; set; } + public RelatedEntity938 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity940 - { - public int Id { get; set; } + public class RelatedEntity940 + { + public int Id { get; set; } - public RelatedEntity939 ParentEntity { get; set; } + public RelatedEntity939 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity941 - { - public int Id { get; set; } + public class RelatedEntity941 + { + public int Id { get; set; } - public RelatedEntity940 ParentEntity { get; set; } + public RelatedEntity940 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity942 - { - public int Id { get; set; } + public class RelatedEntity942 + { + public int Id { get; set; } - public RelatedEntity941 ParentEntity { get; set; } + public RelatedEntity941 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity943 - { - public int Id { get; set; } + public class RelatedEntity943 + { + public int Id { get; set; } - public RelatedEntity942 ParentEntity { get; set; } + public RelatedEntity942 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity944 - { - public int Id { get; set; } + public class RelatedEntity944 + { + public int Id { get; set; } - public RelatedEntity943 ParentEntity { get; set; } + public RelatedEntity943 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity945 - { - public int Id { get; set; } + public class RelatedEntity945 + { + public int Id { get; set; } - public RelatedEntity944 ParentEntity { get; set; } + public RelatedEntity944 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity946 - { - public int Id { get; set; } + public class RelatedEntity946 + { + public int Id { get; set; } - public RelatedEntity945 ParentEntity { get; set; } + public RelatedEntity945 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity947 - { - public int Id { get; set; } + public class RelatedEntity947 + { + public int Id { get; set; } - public RelatedEntity946 ParentEntity { get; set; } + public RelatedEntity946 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity948 - { - public int Id { get; set; } + public class RelatedEntity948 + { + public int Id { get; set; } - public RelatedEntity947 ParentEntity { get; set; } + public RelatedEntity947 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity949 - { - public int Id { get; set; } + public class RelatedEntity949 + { + public int Id { get; set; } - public RelatedEntity948 ParentEntity { get; set; } + public RelatedEntity948 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity950 - { - public int Id { get; set; } + public class RelatedEntity950 + { + public int Id { get; set; } - public RelatedEntity949 ParentEntity { get; set; } + public RelatedEntity949 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity951 - { - public int Id { get; set; } + public class RelatedEntity951 + { + public int Id { get; set; } - public RelatedEntity950 ParentEntity { get; set; } + public RelatedEntity950 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity952 - { - public int Id { get; set; } + public class RelatedEntity952 + { + public int Id { get; set; } - public RelatedEntity951 ParentEntity { get; set; } + public RelatedEntity951 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity953 - { - public int Id { get; set; } + public class RelatedEntity953 + { + public int Id { get; set; } - public RelatedEntity952 ParentEntity { get; set; } + public RelatedEntity952 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity954 - { - public int Id { get; set; } + public class RelatedEntity954 + { + public int Id { get; set; } - public RelatedEntity953 ParentEntity { get; set; } + public RelatedEntity953 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity955 - { - public int Id { get; set; } + public class RelatedEntity955 + { + public int Id { get; set; } - public RelatedEntity954 ParentEntity { get; set; } + public RelatedEntity954 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity956 - { - public int Id { get; set; } + public class RelatedEntity956 + { + public int Id { get; set; } - public RelatedEntity955 ParentEntity { get; set; } + public RelatedEntity955 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity957 - { - public int Id { get; set; } + public class RelatedEntity957 + { + public int Id { get; set; } - public RelatedEntity956 ParentEntity { get; set; } + public RelatedEntity956 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity958 - { - public int Id { get; set; } + public class RelatedEntity958 + { + public int Id { get; set; } - public RelatedEntity957 ParentEntity { get; set; } + public RelatedEntity957 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity959 - { - public int Id { get; set; } + public class RelatedEntity959 + { + public int Id { get; set; } - public RelatedEntity958 ParentEntity { get; set; } + public RelatedEntity958 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity960 - { - public int Id { get; set; } + public class RelatedEntity960 + { + public int Id { get; set; } - public RelatedEntity959 ParentEntity { get; set; } + public RelatedEntity959 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity961 - { - public int Id { get; set; } + public class RelatedEntity961 + { + public int Id { get; set; } - public RelatedEntity960 ParentEntity { get; set; } + public RelatedEntity960 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity962 - { - public int Id { get; set; } + public class RelatedEntity962 + { + public int Id { get; set; } - public RelatedEntity961 ParentEntity { get; set; } + public RelatedEntity961 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity963 - { - public int Id { get; set; } + public class RelatedEntity963 + { + public int Id { get; set; } - public RelatedEntity962 ParentEntity { get; set; } + public RelatedEntity962 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity964 - { - public int Id { get; set; } + public class RelatedEntity964 + { + public int Id { get; set; } - public RelatedEntity963 ParentEntity { get; set; } + public RelatedEntity963 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity965 - { - public int Id { get; set; } + public class RelatedEntity965 + { + public int Id { get; set; } - public RelatedEntity964 ParentEntity { get; set; } + public RelatedEntity964 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity966 - { - public int Id { get; set; } + public class RelatedEntity966 + { + public int Id { get; set; } - public RelatedEntity965 ParentEntity { get; set; } + public RelatedEntity965 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity967 - { - public int Id { get; set; } + public class RelatedEntity967 + { + public int Id { get; set; } - public RelatedEntity966 ParentEntity { get; set; } + public RelatedEntity966 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity968 - { - public int Id { get; set; } + public class RelatedEntity968 + { + public int Id { get; set; } - public RelatedEntity967 ParentEntity { get; set; } + public RelatedEntity967 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity969 - { - public int Id { get; set; } + public class RelatedEntity969 + { + public int Id { get; set; } - public RelatedEntity968 ParentEntity { get; set; } + public RelatedEntity968 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity970 - { - public int Id { get; set; } + public class RelatedEntity970 + { + public int Id { get; set; } - public RelatedEntity969 ParentEntity { get; set; } + public RelatedEntity969 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity971 - { - public int Id { get; set; } + public class RelatedEntity971 + { + public int Id { get; set; } - public RelatedEntity970 ParentEntity { get; set; } + public RelatedEntity970 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity972 - { - public int Id { get; set; } + public class RelatedEntity972 + { + public int Id { get; set; } - public RelatedEntity971 ParentEntity { get; set; } + public RelatedEntity971 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity973 - { - public int Id { get; set; } + public class RelatedEntity973 + { + public int Id { get; set; } - public RelatedEntity972 ParentEntity { get; set; } + public RelatedEntity972 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity974 - { - public int Id { get; set; } + public class RelatedEntity974 + { + public int Id { get; set; } - public RelatedEntity973 ParentEntity { get; set; } + public RelatedEntity973 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity975 - { - public int Id { get; set; } + public class RelatedEntity975 + { + public int Id { get; set; } - public RelatedEntity974 ParentEntity { get; set; } + public RelatedEntity974 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity976 - { - public int Id { get; set; } + public class RelatedEntity976 + { + public int Id { get; set; } - public RelatedEntity975 ParentEntity { get; set; } + public RelatedEntity975 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity977 - { - public int Id { get; set; } + public class RelatedEntity977 + { + public int Id { get; set; } - public RelatedEntity976 ParentEntity { get; set; } + public RelatedEntity976 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity978 - { - public int Id { get; set; } + public class RelatedEntity978 + { + public int Id { get; set; } - public RelatedEntity977 ParentEntity { get; set; } + public RelatedEntity977 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity979 - { - public int Id { get; set; } + public class RelatedEntity979 + { + public int Id { get; set; } - public RelatedEntity978 ParentEntity { get; set; } + public RelatedEntity978 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity980 - { - public int Id { get; set; } + public class RelatedEntity980 + { + public int Id { get; set; } - public RelatedEntity979 ParentEntity { get; set; } + public RelatedEntity979 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity981 - { - public int Id { get; set; } + public class RelatedEntity981 + { + public int Id { get; set; } - public RelatedEntity980 ParentEntity { get; set; } + public RelatedEntity980 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity982 - { - public int Id { get; set; } + public class RelatedEntity982 + { + public int Id { get; set; } - public RelatedEntity981 ParentEntity { get; set; } + public RelatedEntity981 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity983 - { - public int Id { get; set; } + public class RelatedEntity983 + { + public int Id { get; set; } - public RelatedEntity982 ParentEntity { get; set; } + public RelatedEntity982 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity984 - { - public int Id { get; set; } + public class RelatedEntity984 + { + public int Id { get; set; } - public RelatedEntity983 ParentEntity { get; set; } + public RelatedEntity983 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity985 - { - public int Id { get; set; } + public class RelatedEntity985 + { + public int Id { get; set; } - public RelatedEntity984 ParentEntity { get; set; } + public RelatedEntity984 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity986 - { - public int Id { get; set; } + public class RelatedEntity986 + { + public int Id { get; set; } - public RelatedEntity985 ParentEntity { get; set; } + public RelatedEntity985 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity987 - { - public int Id { get; set; } + public class RelatedEntity987 + { + public int Id { get; set; } - public RelatedEntity986 ParentEntity { get; set; } + public RelatedEntity986 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity988 - { - public int Id { get; set; } + public class RelatedEntity988 + { + public int Id { get; set; } - public RelatedEntity987 ParentEntity { get; set; } + public RelatedEntity987 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity989 - { - public int Id { get; set; } + public class RelatedEntity989 + { + public int Id { get; set; } - public RelatedEntity988 ParentEntity { get; set; } + public RelatedEntity988 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity990 - { - public int Id { get; set; } + public class RelatedEntity990 + { + public int Id { get; set; } - public RelatedEntity989 ParentEntity { get; set; } + public RelatedEntity989 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity991 - { - public int Id { get; set; } + public class RelatedEntity991 + { + public int Id { get; set; } - public RelatedEntity990 ParentEntity { get; set; } + public RelatedEntity990 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity992 - { - public int Id { get; set; } + public class RelatedEntity992 + { + public int Id { get; set; } - public RelatedEntity991 ParentEntity { get; set; } + public RelatedEntity991 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity993 - { - public int Id { get; set; } + public class RelatedEntity993 + { + public int Id { get; set; } - public RelatedEntity992 ParentEntity { get; set; } + public RelatedEntity992 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity994 - { - public int Id { get; set; } + public class RelatedEntity994 + { + public int Id { get; set; } - public RelatedEntity993 ParentEntity { get; set; } + public RelatedEntity993 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity995 - { - public int Id { get; set; } + public class RelatedEntity995 + { + public int Id { get; set; } - public RelatedEntity994 ParentEntity { get; set; } + public RelatedEntity994 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity996 - { - public int Id { get; set; } + public class RelatedEntity996 + { + public int Id { get; set; } - public RelatedEntity995 ParentEntity { get; set; } + public RelatedEntity995 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity997 - { - public int Id { get; set; } + public class RelatedEntity997 + { + public int Id { get; set; } - public RelatedEntity996 ParentEntity { get; set; } + public RelatedEntity996 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity998 - { - public int Id { get; set; } + public class RelatedEntity998 + { + public int Id { get; set; } - public RelatedEntity997 ParentEntity { get; set; } + public RelatedEntity997 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity999 - { - public int Id { get; set; } + public class RelatedEntity999 + { + public int Id { get; set; } - public RelatedEntity998 ParentEntity { get; set; } + public RelatedEntity998 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1000 - { - public int Id { get; set; } + public class RelatedEntity1000 + { + public int Id { get; set; } - public RelatedEntity999 ParentEntity { get; set; } + public RelatedEntity999 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1001 - { - public int Id { get; set; } + public class RelatedEntity1001 + { + public int Id { get; set; } - public RelatedEntity1000 ParentEntity { get; set; } + public RelatedEntity1000 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1002 - { - public int Id { get; set; } + public class RelatedEntity1002 + { + public int Id { get; set; } - public RelatedEntity1001 ParentEntity { get; set; } + public RelatedEntity1001 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1003 - { - public int Id { get; set; } + public class RelatedEntity1003 + { + public int Id { get; set; } - public RelatedEntity1002 ParentEntity { get; set; } + public RelatedEntity1002 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1004 - { - public int Id { get; set; } + public class RelatedEntity1004 + { + public int Id { get; set; } - public RelatedEntity1003 ParentEntity { get; set; } + public RelatedEntity1003 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1005 - { - public int Id { get; set; } + public class RelatedEntity1005 + { + public int Id { get; set; } - public RelatedEntity1004 ParentEntity { get; set; } + public RelatedEntity1004 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1006 - { - public int Id { get; set; } + public class RelatedEntity1006 + { + public int Id { get; set; } - public RelatedEntity1005 ParentEntity { get; set; } + public RelatedEntity1005 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1007 - { - public int Id { get; set; } + public class RelatedEntity1007 + { + public int Id { get; set; } - public RelatedEntity1006 ParentEntity { get; set; } + public RelatedEntity1006 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1008 - { - public int Id { get; set; } + public class RelatedEntity1008 + { + public int Id { get; set; } - public RelatedEntity1007 ParentEntity { get; set; } + public RelatedEntity1007 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1009 - { - public int Id { get; set; } + public class RelatedEntity1009 + { + public int Id { get; set; } - public RelatedEntity1008 ParentEntity { get; set; } + public RelatedEntity1008 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1010 - { - public int Id { get; set; } + public class RelatedEntity1010 + { + public int Id { get; set; } - public RelatedEntity1009 ParentEntity { get; set; } + public RelatedEntity1009 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1011 - { - public int Id { get; set; } + public class RelatedEntity1011 + { + public int Id { get; set; } - public RelatedEntity1010 ParentEntity { get; set; } + public RelatedEntity1010 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1012 - { - public int Id { get; set; } + public class RelatedEntity1012 + { + public int Id { get; set; } - public RelatedEntity1011 ParentEntity { get; set; } + public RelatedEntity1011 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1013 - { - public int Id { get; set; } + public class RelatedEntity1013 + { + public int Id { get; set; } - public RelatedEntity1012 ParentEntity { get; set; } + public RelatedEntity1012 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1014 - { - public int Id { get; set; } + public class RelatedEntity1014 + { + public int Id { get; set; } - public RelatedEntity1013 ParentEntity { get; set; } + public RelatedEntity1013 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1015 - { - public int Id { get; set; } + public class RelatedEntity1015 + { + public int Id { get; set; } - public RelatedEntity1014 ParentEntity { get; set; } + public RelatedEntity1014 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1016 - { - public int Id { get; set; } + public class RelatedEntity1016 + { + public int Id { get; set; } - public RelatedEntity1015 ParentEntity { get; set; } + public RelatedEntity1015 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1017 - { - public int Id { get; set; } + public class RelatedEntity1017 + { + public int Id { get; set; } - public RelatedEntity1016 ParentEntity { get; set; } + public RelatedEntity1016 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1018 - { - public int Id { get; set; } + public class RelatedEntity1018 + { + public int Id { get; set; } - public RelatedEntity1017 ParentEntity { get; set; } + public RelatedEntity1017 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1019 - { - public int Id { get; set; } + public class RelatedEntity1019 + { + public int Id { get; set; } - public RelatedEntity1018 ParentEntity { get; set; } + public RelatedEntity1018 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1020 - { - public int Id { get; set; } + public class RelatedEntity1020 + { + public int Id { get; set; } - public RelatedEntity1019 ParentEntity { get; set; } + public RelatedEntity1019 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1021 - { - public int Id { get; set; } + public class RelatedEntity1021 + { + public int Id { get; set; } - public RelatedEntity1020 ParentEntity { get; set; } + public RelatedEntity1020 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1022 - { - public int Id { get; set; } + public class RelatedEntity1022 + { + public int Id { get; set; } - public RelatedEntity1021 ParentEntity { get; set; } + public RelatedEntity1021 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1023 - { - public int Id { get; set; } + public class RelatedEntity1023 + { + public int Id { get; set; } - public RelatedEntity1022 ParentEntity { get; set; } + public RelatedEntity1022 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1024 - { - public int Id { get; set; } + public class RelatedEntity1024 + { + public int Id { get; set; } - public RelatedEntity1023 ParentEntity { get; set; } + public RelatedEntity1023 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1025 - { - public int Id { get; set; } + public class RelatedEntity1025 + { + public int Id { get; set; } - public RelatedEntity1024 ParentEntity { get; set; } + public RelatedEntity1024 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1026 - { - public int Id { get; set; } + public class RelatedEntity1026 + { + public int Id { get; set; } - public RelatedEntity1025 ParentEntity { get; set; } + public RelatedEntity1025 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1027 - { - public int Id { get; set; } + public class RelatedEntity1027 + { + public int Id { get; set; } - public RelatedEntity1026 ParentEntity { get; set; } + public RelatedEntity1026 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1028 - { - public int Id { get; set; } + public class RelatedEntity1028 + { + public int Id { get; set; } - public RelatedEntity1027 ParentEntity { get; set; } + public RelatedEntity1027 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1029 - { - public int Id { get; set; } + public class RelatedEntity1029 + { + public int Id { get; set; } - public RelatedEntity1028 ParentEntity { get; set; } + public RelatedEntity1028 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1030 - { - public int Id { get; set; } + public class RelatedEntity1030 + { + public int Id { get; set; } - public RelatedEntity1029 ParentEntity { get; set; } + public RelatedEntity1029 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1031 - { - public int Id { get; set; } + public class RelatedEntity1031 + { + public int Id { get; set; } - public RelatedEntity1030 ParentEntity { get; set; } + public RelatedEntity1030 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1032 - { - public int Id { get; set; } + public class RelatedEntity1032 + { + public int Id { get; set; } - public RelatedEntity1031 ParentEntity { get; set; } + public RelatedEntity1031 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1033 - { - public int Id { get; set; } + public class RelatedEntity1033 + { + public int Id { get; set; } - public RelatedEntity1032 ParentEntity { get; set; } + public RelatedEntity1032 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1034 - { - public int Id { get; set; } + public class RelatedEntity1034 + { + public int Id { get; set; } - public RelatedEntity1033 ParentEntity { get; set; } + public RelatedEntity1033 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1035 - { - public int Id { get; set; } + public class RelatedEntity1035 + { + public int Id { get; set; } - public RelatedEntity1034 ParentEntity { get; set; } + public RelatedEntity1034 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1036 - { - public int Id { get; set; } + public class RelatedEntity1036 + { + public int Id { get; set; } - public RelatedEntity1035 ParentEntity { get; set; } + public RelatedEntity1035 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1037 - { - public int Id { get; set; } + public class RelatedEntity1037 + { + public int Id { get; set; } - public RelatedEntity1036 ParentEntity { get; set; } + public RelatedEntity1036 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1038 - { - public int Id { get; set; } + public class RelatedEntity1038 + { + public int Id { get; set; } - public RelatedEntity1037 ParentEntity { get; set; } + public RelatedEntity1037 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1039 - { - public int Id { get; set; } + public class RelatedEntity1039 + { + public int Id { get; set; } - public RelatedEntity1038 ParentEntity { get; set; } + public RelatedEntity1038 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1040 - { - public int Id { get; set; } + public class RelatedEntity1040 + { + public int Id { get; set; } - public RelatedEntity1039 ParentEntity { get; set; } + public RelatedEntity1039 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1041 - { - public int Id { get; set; } + public class RelatedEntity1041 + { + public int Id { get; set; } - public RelatedEntity1040 ParentEntity { get; set; } + public RelatedEntity1040 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1042 - { - public int Id { get; set; } + public class RelatedEntity1042 + { + public int Id { get; set; } - public RelatedEntity1041 ParentEntity { get; set; } + public RelatedEntity1041 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1043 - { - public int Id { get; set; } + public class RelatedEntity1043 + { + public int Id { get; set; } - public RelatedEntity1042 ParentEntity { get; set; } + public RelatedEntity1042 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1044 - { - public int Id { get; set; } + public class RelatedEntity1044 + { + public int Id { get; set; } - public RelatedEntity1043 ParentEntity { get; set; } + public RelatedEntity1043 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1045 - { - public int Id { get; set; } + public class RelatedEntity1045 + { + public int Id { get; set; } - public RelatedEntity1044 ParentEntity { get; set; } + public RelatedEntity1044 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1046 - { - public int Id { get; set; } + public class RelatedEntity1046 + { + public int Id { get; set; } - public RelatedEntity1045 ParentEntity { get; set; } + public RelatedEntity1045 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1047 - { - public int Id { get; set; } + public class RelatedEntity1047 + { + public int Id { get; set; } - public RelatedEntity1046 ParentEntity { get; set; } + public RelatedEntity1046 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1048 - { - public int Id { get; set; } + public class RelatedEntity1048 + { + public int Id { get; set; } - public RelatedEntity1047 ParentEntity { get; set; } + public RelatedEntity1047 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1049 - { - public int Id { get; set; } + public class RelatedEntity1049 + { + public int Id { get; set; } - public RelatedEntity1048 ParentEntity { get; set; } + public RelatedEntity1048 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1050 - { - public int Id { get; set; } + public class RelatedEntity1050 + { + public int Id { get; set; } - public RelatedEntity1049 ParentEntity { get; set; } + public RelatedEntity1049 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1051 - { - public int Id { get; set; } + public class RelatedEntity1051 + { + public int Id { get; set; } - public RelatedEntity1050 ParentEntity { get; set; } + public RelatedEntity1050 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1052 - { - public int Id { get; set; } + public class RelatedEntity1052 + { + public int Id { get; set; } - public RelatedEntity1051 ParentEntity { get; set; } + public RelatedEntity1051 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1053 - { - public int Id { get; set; } + public class RelatedEntity1053 + { + public int Id { get; set; } - public RelatedEntity1052 ParentEntity { get; set; } + public RelatedEntity1052 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1054 - { - public int Id { get; set; } + public class RelatedEntity1054 + { + public int Id { get; set; } - public RelatedEntity1053 ParentEntity { get; set; } + public RelatedEntity1053 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1055 - { - public int Id { get; set; } + public class RelatedEntity1055 + { + public int Id { get; set; } - public RelatedEntity1054 ParentEntity { get; set; } + public RelatedEntity1054 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1056 - { - public int Id { get; set; } + public class RelatedEntity1056 + { + public int Id { get; set; } - public RelatedEntity1055 ParentEntity { get; set; } + public RelatedEntity1055 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1057 - { - public int Id { get; set; } + public class RelatedEntity1057 + { + public int Id { get; set; } - public RelatedEntity1056 ParentEntity { get; set; } + public RelatedEntity1056 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1058 - { - public int Id { get; set; } + public class RelatedEntity1058 + { + public int Id { get; set; } - public RelatedEntity1057 ParentEntity { get; set; } + public RelatedEntity1057 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1059 - { - public int Id { get; set; } + public class RelatedEntity1059 + { + public int Id { get; set; } - public RelatedEntity1058 ParentEntity { get; set; } + public RelatedEntity1058 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1060 - { - public int Id { get; set; } + public class RelatedEntity1060 + { + public int Id { get; set; } - public RelatedEntity1059 ParentEntity { get; set; } + public RelatedEntity1059 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1061 - { - public int Id { get; set; } + public class RelatedEntity1061 + { + public int Id { get; set; } - public RelatedEntity1060 ParentEntity { get; set; } + public RelatedEntity1060 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1062 - { - public int Id { get; set; } + public class RelatedEntity1062 + { + public int Id { get; set; } - public RelatedEntity1061 ParentEntity { get; set; } + public RelatedEntity1061 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1063 - { - public int Id { get; set; } + public class RelatedEntity1063 + { + public int Id { get; set; } - public RelatedEntity1062 ParentEntity { get; set; } + public RelatedEntity1062 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1064 - { - public int Id { get; set; } + public class RelatedEntity1064 + { + public int Id { get; set; } - public RelatedEntity1063 ParentEntity { get; set; } + public RelatedEntity1063 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1065 - { - public int Id { get; set; } + public class RelatedEntity1065 + { + public int Id { get; set; } - public RelatedEntity1064 ParentEntity { get; set; } + public RelatedEntity1064 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1066 - { - public int Id { get; set; } + public class RelatedEntity1066 + { + public int Id { get; set; } - public RelatedEntity1065 ParentEntity { get; set; } + public RelatedEntity1065 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1067 - { - public int Id { get; set; } + public class RelatedEntity1067 + { + public int Id { get; set; } - public RelatedEntity1066 ParentEntity { get; set; } + public RelatedEntity1066 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1068 - { - public int Id { get; set; } + public class RelatedEntity1068 + { + public int Id { get; set; } - public RelatedEntity1067 ParentEntity { get; set; } + public RelatedEntity1067 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1069 - { - public int Id { get; set; } + public class RelatedEntity1069 + { + public int Id { get; set; } - public RelatedEntity1068 ParentEntity { get; set; } + public RelatedEntity1068 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1070 - { - public int Id { get; set; } + public class RelatedEntity1070 + { + public int Id { get; set; } - public RelatedEntity1069 ParentEntity { get; set; } + public RelatedEntity1069 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1071 - { - public int Id { get; set; } + public class RelatedEntity1071 + { + public int Id { get; set; } - public RelatedEntity1070 ParentEntity { get; set; } + public RelatedEntity1070 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1072 - { - public int Id { get; set; } + public class RelatedEntity1072 + { + public int Id { get; set; } - public RelatedEntity1071 ParentEntity { get; set; } + public RelatedEntity1071 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1073 - { - public int Id { get; set; } + public class RelatedEntity1073 + { + public int Id { get; set; } - public RelatedEntity1072 ParentEntity { get; set; } + public RelatedEntity1072 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1074 - { - public int Id { get; set; } + public class RelatedEntity1074 + { + public int Id { get; set; } - public RelatedEntity1073 ParentEntity { get; set; } + public RelatedEntity1073 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1075 - { - public int Id { get; set; } + public class RelatedEntity1075 + { + public int Id { get; set; } - public RelatedEntity1074 ParentEntity { get; set; } + public RelatedEntity1074 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1076 - { - public int Id { get; set; } + public class RelatedEntity1076 + { + public int Id { get; set; } - public RelatedEntity1075 ParentEntity { get; set; } + public RelatedEntity1075 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1077 - { - public int Id { get; set; } + public class RelatedEntity1077 + { + public int Id { get; set; } - public RelatedEntity1076 ParentEntity { get; set; } + public RelatedEntity1076 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1078 - { - public int Id { get; set; } + public class RelatedEntity1078 + { + public int Id { get; set; } - public RelatedEntity1077 ParentEntity { get; set; } + public RelatedEntity1077 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1079 - { - public int Id { get; set; } + public class RelatedEntity1079 + { + public int Id { get; set; } - public RelatedEntity1078 ParentEntity { get; set; } + public RelatedEntity1078 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1080 - { - public int Id { get; set; } + public class RelatedEntity1080 + { + public int Id { get; set; } - public RelatedEntity1079 ParentEntity { get; set; } + public RelatedEntity1079 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1081 - { - public int Id { get; set; } + public class RelatedEntity1081 + { + public int Id { get; set; } - public RelatedEntity1080 ParentEntity { get; set; } + public RelatedEntity1080 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1082 - { - public int Id { get; set; } + public class RelatedEntity1082 + { + public int Id { get; set; } - public RelatedEntity1081 ParentEntity { get; set; } + public RelatedEntity1081 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1083 - { - public int Id { get; set; } + public class RelatedEntity1083 + { + public int Id { get; set; } - public RelatedEntity1082 ParentEntity { get; set; } + public RelatedEntity1082 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1084 - { - public int Id { get; set; } + public class RelatedEntity1084 + { + public int Id { get; set; } - public RelatedEntity1083 ParentEntity { get; set; } + public RelatedEntity1083 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1085 - { - public int Id { get; set; } + public class RelatedEntity1085 + { + public int Id { get; set; } - public RelatedEntity1084 ParentEntity { get; set; } + public RelatedEntity1084 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1086 - { - public int Id { get; set; } + public class RelatedEntity1086 + { + public int Id { get; set; } - public RelatedEntity1085 ParentEntity { get; set; } + public RelatedEntity1085 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1087 - { - public int Id { get; set; } + public class RelatedEntity1087 + { + public int Id { get; set; } - public RelatedEntity1086 ParentEntity { get; set; } + public RelatedEntity1086 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1088 - { - public int Id { get; set; } + public class RelatedEntity1088 + { + public int Id { get; set; } - public RelatedEntity1087 ParentEntity { get; set; } + public RelatedEntity1087 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1089 - { - public int Id { get; set; } + public class RelatedEntity1089 + { + public int Id { get; set; } - public RelatedEntity1088 ParentEntity { get; set; } + public RelatedEntity1088 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1090 - { - public int Id { get; set; } + public class RelatedEntity1090 + { + public int Id { get; set; } - public RelatedEntity1089 ParentEntity { get; set; } + public RelatedEntity1089 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1091 - { - public int Id { get; set; } + public class RelatedEntity1091 + { + public int Id { get; set; } - public RelatedEntity1090 ParentEntity { get; set; } + public RelatedEntity1090 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1092 - { - public int Id { get; set; } + public class RelatedEntity1092 + { + public int Id { get; set; } - public RelatedEntity1091 ParentEntity { get; set; } + public RelatedEntity1091 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1093 - { - public int Id { get; set; } + public class RelatedEntity1093 + { + public int Id { get; set; } - public RelatedEntity1092 ParentEntity { get; set; } + public RelatedEntity1092 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1094 - { - public int Id { get; set; } + public class RelatedEntity1094 + { + public int Id { get; set; } - public RelatedEntity1093 ParentEntity { get; set; } + public RelatedEntity1093 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1095 - { - public int Id { get; set; } + public class RelatedEntity1095 + { + public int Id { get; set; } - public RelatedEntity1094 ParentEntity { get; set; } + public RelatedEntity1094 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1096 - { - public int Id { get; set; } + public class RelatedEntity1096 + { + public int Id { get; set; } - public RelatedEntity1095 ParentEntity { get; set; } + public RelatedEntity1095 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1097 - { - public int Id { get; set; } + public class RelatedEntity1097 + { + public int Id { get; set; } - public RelatedEntity1096 ParentEntity { get; set; } + public RelatedEntity1096 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1098 - { - public int Id { get; set; } + public class RelatedEntity1098 + { + public int Id { get; set; } - public RelatedEntity1097 ParentEntity { get; set; } + public RelatedEntity1097 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1099 - { - public int Id { get; set; } + public class RelatedEntity1099 + { + public int Id { get; set; } - public RelatedEntity1098 ParentEntity { get; set; } + public RelatedEntity1098 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1100 - { - public int Id { get; set; } + public class RelatedEntity1100 + { + public int Id { get; set; } - public RelatedEntity1099 ParentEntity { get; set; } + public RelatedEntity1099 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1101 - { - public int Id { get; set; } + public class RelatedEntity1101 + { + public int Id { get; set; } - public RelatedEntity1100 ParentEntity { get; set; } + public RelatedEntity1100 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1102 - { - public int Id { get; set; } + public class RelatedEntity1102 + { + public int Id { get; set; } - public RelatedEntity1101 ParentEntity { get; set; } + public RelatedEntity1101 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1103 - { - public int Id { get; set; } + public class RelatedEntity1103 + { + public int Id { get; set; } - public RelatedEntity1102 ParentEntity { get; set; } + public RelatedEntity1102 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1104 - { - public int Id { get; set; } + public class RelatedEntity1104 + { + public int Id { get; set; } - public RelatedEntity1103 ParentEntity { get; set; } + public RelatedEntity1103 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1105 - { - public int Id { get; set; } + public class RelatedEntity1105 + { + public int Id { get; set; } - public RelatedEntity1104 ParentEntity { get; set; } + public RelatedEntity1104 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1106 - { - public int Id { get; set; } + public class RelatedEntity1106 + { + public int Id { get; set; } - public RelatedEntity1105 ParentEntity { get; set; } + public RelatedEntity1105 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1107 - { - public int Id { get; set; } + public class RelatedEntity1107 + { + public int Id { get; set; } - public RelatedEntity1106 ParentEntity { get; set; } + public RelatedEntity1106 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1108 - { - public int Id { get; set; } + public class RelatedEntity1108 + { + public int Id { get; set; } - public RelatedEntity1107 ParentEntity { get; set; } + public RelatedEntity1107 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1109 - { - public int Id { get; set; } + public class RelatedEntity1109 + { + public int Id { get; set; } - public RelatedEntity1108 ParentEntity { get; set; } + public RelatedEntity1108 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1110 - { - public int Id { get; set; } + public class RelatedEntity1110 + { + public int Id { get; set; } - public RelatedEntity1109 ParentEntity { get; set; } + public RelatedEntity1109 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1111 - { - public int Id { get; set; } + public class RelatedEntity1111 + { + public int Id { get; set; } - public RelatedEntity1110 ParentEntity { get; set; } + public RelatedEntity1110 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1112 - { - public int Id { get; set; } + public class RelatedEntity1112 + { + public int Id { get; set; } - public RelatedEntity1111 ParentEntity { get; set; } + public RelatedEntity1111 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1113 - { - public int Id { get; set; } + public class RelatedEntity1113 + { + public int Id { get; set; } - public RelatedEntity1112 ParentEntity { get; set; } + public RelatedEntity1112 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1114 - { - public int Id { get; set; } + public class RelatedEntity1114 + { + public int Id { get; set; } - public RelatedEntity1113 ParentEntity { get; set; } + public RelatedEntity1113 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1115 - { - public int Id { get; set; } + public class RelatedEntity1115 + { + public int Id { get; set; } - public RelatedEntity1114 ParentEntity { get; set; } + public RelatedEntity1114 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1116 - { - public int Id { get; set; } + public class RelatedEntity1116 + { + public int Id { get; set; } - public RelatedEntity1115 ParentEntity { get; set; } + public RelatedEntity1115 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1117 - { - public int Id { get; set; } + public class RelatedEntity1117 + { + public int Id { get; set; } - public RelatedEntity1116 ParentEntity { get; set; } + public RelatedEntity1116 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1118 - { - public int Id { get; set; } + public class RelatedEntity1118 + { + public int Id { get; set; } - public RelatedEntity1117 ParentEntity { get; set; } + public RelatedEntity1117 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1119 - { - public int Id { get; set; } + public class RelatedEntity1119 + { + public int Id { get; set; } - public RelatedEntity1118 ParentEntity { get; set; } + public RelatedEntity1118 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1120 - { - public int Id { get; set; } + public class RelatedEntity1120 + { + public int Id { get; set; } - public RelatedEntity1119 ParentEntity { get; set; } + public RelatedEntity1119 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1121 - { - public int Id { get; set; } + public class RelatedEntity1121 + { + public int Id { get; set; } - public RelatedEntity1120 ParentEntity { get; set; } + public RelatedEntity1120 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1122 - { - public int Id { get; set; } + public class RelatedEntity1122 + { + public int Id { get; set; } - public RelatedEntity1121 ParentEntity { get; set; } + public RelatedEntity1121 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1123 - { - public int Id { get; set; } + public class RelatedEntity1123 + { + public int Id { get; set; } - public RelatedEntity1122 ParentEntity { get; set; } + public RelatedEntity1122 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1124 - { - public int Id { get; set; } + public class RelatedEntity1124 + { + public int Id { get; set; } - public RelatedEntity1123 ParentEntity { get; set; } + public RelatedEntity1123 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1125 - { - public int Id { get; set; } + public class RelatedEntity1125 + { + public int Id { get; set; } - public RelatedEntity1124 ParentEntity { get; set; } + public RelatedEntity1124 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1126 - { - public int Id { get; set; } + public class RelatedEntity1126 + { + public int Id { get; set; } - public RelatedEntity1125 ParentEntity { get; set; } + public RelatedEntity1125 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1127 - { - public int Id { get; set; } + public class RelatedEntity1127 + { + public int Id { get; set; } - public RelatedEntity1126 ParentEntity { get; set; } + public RelatedEntity1126 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1128 - { - public int Id { get; set; } + public class RelatedEntity1128 + { + public int Id { get; set; } - public RelatedEntity1127 ParentEntity { get; set; } + public RelatedEntity1127 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1129 - { - public int Id { get; set; } + public class RelatedEntity1129 + { + public int Id { get; set; } - public RelatedEntity1128 ParentEntity { get; set; } + public RelatedEntity1128 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1130 - { - public int Id { get; set; } + public class RelatedEntity1130 + { + public int Id { get; set; } - public RelatedEntity1129 ParentEntity { get; set; } + public RelatedEntity1129 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1131 - { - public int Id { get; set; } + public class RelatedEntity1131 + { + public int Id { get; set; } - public RelatedEntity1130 ParentEntity { get; set; } + public RelatedEntity1130 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1132 - { - public int Id { get; set; } + public class RelatedEntity1132 + { + public int Id { get; set; } - public RelatedEntity1131 ParentEntity { get; set; } + public RelatedEntity1131 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1133 - { - public int Id { get; set; } + public class RelatedEntity1133 + { + public int Id { get; set; } - public RelatedEntity1132 ParentEntity { get; set; } + public RelatedEntity1132 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1134 - { - public int Id { get; set; } + public class RelatedEntity1134 + { + public int Id { get; set; } - public RelatedEntity1133 ParentEntity { get; set; } + public RelatedEntity1133 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1135 - { - public int Id { get; set; } + public class RelatedEntity1135 + { + public int Id { get; set; } - public RelatedEntity1134 ParentEntity { get; set; } + public RelatedEntity1134 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1136 - { - public int Id { get; set; } + public class RelatedEntity1136 + { + public int Id { get; set; } - public RelatedEntity1135 ParentEntity { get; set; } + public RelatedEntity1135 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1137 - { - public int Id { get; set; } + public class RelatedEntity1137 + { + public int Id { get; set; } - public RelatedEntity1136 ParentEntity { get; set; } + public RelatedEntity1136 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1138 - { - public int Id { get; set; } + public class RelatedEntity1138 + { + public int Id { get; set; } - public RelatedEntity1137 ParentEntity { get; set; } + public RelatedEntity1137 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1139 - { - public int Id { get; set; } + public class RelatedEntity1139 + { + public int Id { get; set; } - public RelatedEntity1138 ParentEntity { get; set; } + public RelatedEntity1138 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1140 - { - public int Id { get; set; } + public class RelatedEntity1140 + { + public int Id { get; set; } - public RelatedEntity1139 ParentEntity { get; set; } + public RelatedEntity1139 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1141 - { - public int Id { get; set; } + public class RelatedEntity1141 + { + public int Id { get; set; } - public RelatedEntity1140 ParentEntity { get; set; } + public RelatedEntity1140 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1142 - { - public int Id { get; set; } + public class RelatedEntity1142 + { + public int Id { get; set; } - public RelatedEntity1141 ParentEntity { get; set; } + public RelatedEntity1141 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1143 - { - public int Id { get; set; } + public class RelatedEntity1143 + { + public int Id { get; set; } - public RelatedEntity1142 ParentEntity { get; set; } + public RelatedEntity1142 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1144 - { - public int Id { get; set; } + public class RelatedEntity1144 + { + public int Id { get; set; } - public RelatedEntity1143 ParentEntity { get; set; } + public RelatedEntity1143 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1145 - { - public int Id { get; set; } + public class RelatedEntity1145 + { + public int Id { get; set; } - public RelatedEntity1144 ParentEntity { get; set; } + public RelatedEntity1144 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1146 - { - public int Id { get; set; } + public class RelatedEntity1146 + { + public int Id { get; set; } - public RelatedEntity1145 ParentEntity { get; set; } + public RelatedEntity1145 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1147 - { - public int Id { get; set; } + public class RelatedEntity1147 + { + public int Id { get; set; } - public RelatedEntity1146 ParentEntity { get; set; } + public RelatedEntity1146 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1148 - { - public int Id { get; set; } + public class RelatedEntity1148 + { + public int Id { get; set; } - public RelatedEntity1147 ParentEntity { get; set; } + public RelatedEntity1147 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1149 - { - public int Id { get; set; } + public class RelatedEntity1149 + { + public int Id { get; set; } - public RelatedEntity1148 ParentEntity { get; set; } + public RelatedEntity1148 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1150 - { - public int Id { get; set; } + public class RelatedEntity1150 + { + public int Id { get; set; } - public RelatedEntity1149 ParentEntity { get; set; } + public RelatedEntity1149 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1151 - { - public int Id { get; set; } + public class RelatedEntity1151 + { + public int Id { get; set; } - public RelatedEntity1150 ParentEntity { get; set; } + public RelatedEntity1150 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1152 - { - public int Id { get; set; } + public class RelatedEntity1152 + { + public int Id { get; set; } - public RelatedEntity1151 ParentEntity { get; set; } + public RelatedEntity1151 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1153 - { - public int Id { get; set; } + public class RelatedEntity1153 + { + public int Id { get; set; } - public RelatedEntity1152 ParentEntity { get; set; } + public RelatedEntity1152 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1154 - { - public int Id { get; set; } + public class RelatedEntity1154 + { + public int Id { get; set; } - public RelatedEntity1153 ParentEntity { get; set; } + public RelatedEntity1153 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1155 - { - public int Id { get; set; } + public class RelatedEntity1155 + { + public int Id { get; set; } - public RelatedEntity1154 ParentEntity { get; set; } + public RelatedEntity1154 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1156 - { - public int Id { get; set; } + public class RelatedEntity1156 + { + public int Id { get; set; } - public RelatedEntity1155 ParentEntity { get; set; } + public RelatedEntity1155 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1157 - { - public int Id { get; set; } + public class RelatedEntity1157 + { + public int Id { get; set; } - public RelatedEntity1156 ParentEntity { get; set; } + public RelatedEntity1156 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1158 - { - public int Id { get; set; } + public class RelatedEntity1158 + { + public int Id { get; set; } - public RelatedEntity1157 ParentEntity { get; set; } + public RelatedEntity1157 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1159 - { - public int Id { get; set; } + public class RelatedEntity1159 + { + public int Id { get; set; } - public RelatedEntity1158 ParentEntity { get; set; } + public RelatedEntity1158 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1160 - { - public int Id { get; set; } + public class RelatedEntity1160 + { + public int Id { get; set; } - public RelatedEntity1159 ParentEntity { get; set; } + public RelatedEntity1159 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1161 - { - public int Id { get; set; } + public class RelatedEntity1161 + { + public int Id { get; set; } - public RelatedEntity1160 ParentEntity { get; set; } + public RelatedEntity1160 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1162 - { - public int Id { get; set; } + public class RelatedEntity1162 + { + public int Id { get; set; } - public RelatedEntity1161 ParentEntity { get; set; } + public RelatedEntity1161 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1163 - { - public int Id { get; set; } + public class RelatedEntity1163 + { + public int Id { get; set; } - public RelatedEntity1162 ParentEntity { get; set; } + public RelatedEntity1162 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1164 - { - public int Id { get; set; } + public class RelatedEntity1164 + { + public int Id { get; set; } - public RelatedEntity1163 ParentEntity { get; set; } + public RelatedEntity1163 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1165 - { - public int Id { get; set; } + public class RelatedEntity1165 + { + public int Id { get; set; } - public RelatedEntity1164 ParentEntity { get; set; } + public RelatedEntity1164 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1166 - { - public int Id { get; set; } + public class RelatedEntity1166 + { + public int Id { get; set; } - public RelatedEntity1165 ParentEntity { get; set; } + public RelatedEntity1165 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1167 - { - public int Id { get; set; } + public class RelatedEntity1167 + { + public int Id { get; set; } - public RelatedEntity1166 ParentEntity { get; set; } + public RelatedEntity1166 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1168 - { - public int Id { get; set; } + public class RelatedEntity1168 + { + public int Id { get; set; } - public RelatedEntity1167 ParentEntity { get; set; } + public RelatedEntity1167 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1169 - { - public int Id { get; set; } + public class RelatedEntity1169 + { + public int Id { get; set; } - public RelatedEntity1168 ParentEntity { get; set; } + public RelatedEntity1168 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1170 - { - public int Id { get; set; } + public class RelatedEntity1170 + { + public int Id { get; set; } - public RelatedEntity1169 ParentEntity { get; set; } + public RelatedEntity1169 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1171 - { - public int Id { get; set; } + public class RelatedEntity1171 + { + public int Id { get; set; } - public RelatedEntity1170 ParentEntity { get; set; } + public RelatedEntity1170 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1172 - { - public int Id { get; set; } + public class RelatedEntity1172 + { + public int Id { get; set; } - public RelatedEntity1171 ParentEntity { get; set; } + public RelatedEntity1171 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1173 - { - public int Id { get; set; } + public class RelatedEntity1173 + { + public int Id { get; set; } - public RelatedEntity1172 ParentEntity { get; set; } + public RelatedEntity1172 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1174 - { - public int Id { get; set; } + public class RelatedEntity1174 + { + public int Id { get; set; } - public RelatedEntity1173 ParentEntity { get; set; } + public RelatedEntity1173 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1175 - { - public int Id { get; set; } + public class RelatedEntity1175 + { + public int Id { get; set; } - public RelatedEntity1174 ParentEntity { get; set; } + public RelatedEntity1174 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1176 - { - public int Id { get; set; } + public class RelatedEntity1176 + { + public int Id { get; set; } - public RelatedEntity1175 ParentEntity { get; set; } + public RelatedEntity1175 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1177 - { - public int Id { get; set; } + public class RelatedEntity1177 + { + public int Id { get; set; } - public RelatedEntity1176 ParentEntity { get; set; } + public RelatedEntity1176 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1178 - { - public int Id { get; set; } + public class RelatedEntity1178 + { + public int Id { get; set; } - public RelatedEntity1177 ParentEntity { get; set; } + public RelatedEntity1177 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1179 - { - public int Id { get; set; } + public class RelatedEntity1179 + { + public int Id { get; set; } - public RelatedEntity1178 ParentEntity { get; set; } + public RelatedEntity1178 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1180 - { - public int Id { get; set; } + public class RelatedEntity1180 + { + public int Id { get; set; } - public RelatedEntity1179 ParentEntity { get; set; } + public RelatedEntity1179 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1181 - { - public int Id { get; set; } + public class RelatedEntity1181 + { + public int Id { get; set; } - public RelatedEntity1180 ParentEntity { get; set; } + public RelatedEntity1180 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1182 - { - public int Id { get; set; } + public class RelatedEntity1182 + { + public int Id { get; set; } - public RelatedEntity1181 ParentEntity { get; set; } + public RelatedEntity1181 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1183 - { - public int Id { get; set; } + public class RelatedEntity1183 + { + public int Id { get; set; } - public RelatedEntity1182 ParentEntity { get; set; } + public RelatedEntity1182 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1184 - { - public int Id { get; set; } + public class RelatedEntity1184 + { + public int Id { get; set; } - public RelatedEntity1183 ParentEntity { get; set; } + public RelatedEntity1183 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1185 - { - public int Id { get; set; } + public class RelatedEntity1185 + { + public int Id { get; set; } - public RelatedEntity1184 ParentEntity { get; set; } + public RelatedEntity1184 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1186 - { - public int Id { get; set; } + public class RelatedEntity1186 + { + public int Id { get; set; } - public RelatedEntity1185 ParentEntity { get; set; } + public RelatedEntity1185 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1187 - { - public int Id { get; set; } + public class RelatedEntity1187 + { + public int Id { get; set; } - public RelatedEntity1186 ParentEntity { get; set; } + public RelatedEntity1186 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1188 - { - public int Id { get; set; } + public class RelatedEntity1188 + { + public int Id { get; set; } - public RelatedEntity1187 ParentEntity { get; set; } + public RelatedEntity1187 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1189 - { - public int Id { get; set; } + public class RelatedEntity1189 + { + public int Id { get; set; } - public RelatedEntity1188 ParentEntity { get; set; } + public RelatedEntity1188 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1190 - { - public int Id { get; set; } + public class RelatedEntity1190 + { + public int Id { get; set; } - public RelatedEntity1189 ParentEntity { get; set; } + public RelatedEntity1189 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1191 - { - public int Id { get; set; } + public class RelatedEntity1191 + { + public int Id { get; set; } - public RelatedEntity1190 ParentEntity { get; set; } + public RelatedEntity1190 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1192 - { - public int Id { get; set; } + public class RelatedEntity1192 + { + public int Id { get; set; } - public RelatedEntity1191 ParentEntity { get; set; } + public RelatedEntity1191 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1193 - { - public int Id { get; set; } + public class RelatedEntity1193 + { + public int Id { get; set; } - public RelatedEntity1192 ParentEntity { get; set; } + public RelatedEntity1192 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1194 - { - public int Id { get; set; } + public class RelatedEntity1194 + { + public int Id { get; set; } - public RelatedEntity1193 ParentEntity { get; set; } + public RelatedEntity1193 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1195 - { - public int Id { get; set; } + public class RelatedEntity1195 + { + public int Id { get; set; } - public RelatedEntity1194 ParentEntity { get; set; } + public RelatedEntity1194 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1196 - { - public int Id { get; set; } + public class RelatedEntity1196 + { + public int Id { get; set; } - public RelatedEntity1195 ParentEntity { get; set; } + public RelatedEntity1195 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1197 - { - public int Id { get; set; } + public class RelatedEntity1197 + { + public int Id { get; set; } - public RelatedEntity1196 ParentEntity { get; set; } + public RelatedEntity1196 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1198 - { - public int Id { get; set; } + public class RelatedEntity1198 + { + public int Id { get; set; } - public RelatedEntity1197 ParentEntity { get; set; } + public RelatedEntity1197 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1199 - { - public int Id { get; set; } + public class RelatedEntity1199 + { + public int Id { get; set; } - public RelatedEntity1198 ParentEntity { get; set; } + public RelatedEntity1198 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1200 - { - public int Id { get; set; } + public class RelatedEntity1200 + { + public int Id { get; set; } - public RelatedEntity1199 ParentEntity { get; set; } + public RelatedEntity1199 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1201 - { - public int Id { get; set; } + public class RelatedEntity1201 + { + public int Id { get; set; } - public RelatedEntity1200 ParentEntity { get; set; } + public RelatedEntity1200 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1202 - { - public int Id { get; set; } + public class RelatedEntity1202 + { + public int Id { get; set; } - public RelatedEntity1201 ParentEntity { get; set; } + public RelatedEntity1201 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1203 - { - public int Id { get; set; } + public class RelatedEntity1203 + { + public int Id { get; set; } - public RelatedEntity1202 ParentEntity { get; set; } + public RelatedEntity1202 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1204 - { - public int Id { get; set; } + public class RelatedEntity1204 + { + public int Id { get; set; } - public RelatedEntity1203 ParentEntity { get; set; } + public RelatedEntity1203 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1205 - { - public int Id { get; set; } + public class RelatedEntity1205 + { + public int Id { get; set; } - public RelatedEntity1204 ParentEntity { get; set; } + public RelatedEntity1204 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1206 - { - public int Id { get; set; } + public class RelatedEntity1206 + { + public int Id { get; set; } - public RelatedEntity1205 ParentEntity { get; set; } + public RelatedEntity1205 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1207 - { - public int Id { get; set; } + public class RelatedEntity1207 + { + public int Id { get; set; } - public RelatedEntity1206 ParentEntity { get; set; } + public RelatedEntity1206 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1208 - { - public int Id { get; set; } + public class RelatedEntity1208 + { + public int Id { get; set; } - public RelatedEntity1207 ParentEntity { get; set; } + public RelatedEntity1207 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1209 - { - public int Id { get; set; } + public class RelatedEntity1209 + { + public int Id { get; set; } - public RelatedEntity1208 ParentEntity { get; set; } + public RelatedEntity1208 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1210 - { - public int Id { get; set; } + public class RelatedEntity1210 + { + public int Id { get; set; } - public RelatedEntity1209 ParentEntity { get; set; } + public RelatedEntity1209 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1211 - { - public int Id { get; set; } + public class RelatedEntity1211 + { + public int Id { get; set; } - public RelatedEntity1210 ParentEntity { get; set; } + public RelatedEntity1210 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1212 - { - public int Id { get; set; } + public class RelatedEntity1212 + { + public int Id { get; set; } - public RelatedEntity1211 ParentEntity { get; set; } + public RelatedEntity1211 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1213 - { - public int Id { get; set; } + public class RelatedEntity1213 + { + public int Id { get; set; } - public RelatedEntity1212 ParentEntity { get; set; } + public RelatedEntity1212 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1214 - { - public int Id { get; set; } + public class RelatedEntity1214 + { + public int Id { get; set; } - public RelatedEntity1213 ParentEntity { get; set; } + public RelatedEntity1213 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1215 - { - public int Id { get; set; } + public class RelatedEntity1215 + { + public int Id { get; set; } - public RelatedEntity1214 ParentEntity { get; set; } + public RelatedEntity1214 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1216 - { - public int Id { get; set; } + public class RelatedEntity1216 + { + public int Id { get; set; } - public RelatedEntity1215 ParentEntity { get; set; } + public RelatedEntity1215 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1217 - { - public int Id { get; set; } + public class RelatedEntity1217 + { + public int Id { get; set; } - public RelatedEntity1216 ParentEntity { get; set; } + public RelatedEntity1216 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1218 - { - public int Id { get; set; } + public class RelatedEntity1218 + { + public int Id { get; set; } - public RelatedEntity1217 ParentEntity { get; set; } + public RelatedEntity1217 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1219 - { - public int Id { get; set; } + public class RelatedEntity1219 + { + public int Id { get; set; } - public RelatedEntity1218 ParentEntity { get; set; } + public RelatedEntity1218 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1220 - { - public int Id { get; set; } + public class RelatedEntity1220 + { + public int Id { get; set; } - public RelatedEntity1219 ParentEntity { get; set; } + public RelatedEntity1219 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1221 - { - public int Id { get; set; } + public class RelatedEntity1221 + { + public int Id { get; set; } - public RelatedEntity1220 ParentEntity { get; set; } + public RelatedEntity1220 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1222 - { - public int Id { get; set; } + public class RelatedEntity1222 + { + public int Id { get; set; } - public RelatedEntity1221 ParentEntity { get; set; } + public RelatedEntity1221 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1223 - { - public int Id { get; set; } + public class RelatedEntity1223 + { + public int Id { get; set; } - public RelatedEntity1222 ParentEntity { get; set; } + public RelatedEntity1222 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1224 - { - public int Id { get; set; } + public class RelatedEntity1224 + { + public int Id { get; set; } - public RelatedEntity1223 ParentEntity { get; set; } + public RelatedEntity1223 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1225 - { - public int Id { get; set; } + public class RelatedEntity1225 + { + public int Id { get; set; } - public RelatedEntity1224 ParentEntity { get; set; } + public RelatedEntity1224 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1226 - { - public int Id { get; set; } + public class RelatedEntity1226 + { + public int Id { get; set; } - public RelatedEntity1225 ParentEntity { get; set; } + public RelatedEntity1225 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1227 - { - public int Id { get; set; } + public class RelatedEntity1227 + { + public int Id { get; set; } - public RelatedEntity1226 ParentEntity { get; set; } + public RelatedEntity1226 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1228 - { - public int Id { get; set; } + public class RelatedEntity1228 + { + public int Id { get; set; } - public RelatedEntity1227 ParentEntity { get; set; } + public RelatedEntity1227 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1229 - { - public int Id { get; set; } + public class RelatedEntity1229 + { + public int Id { get; set; } - public RelatedEntity1228 ParentEntity { get; set; } + public RelatedEntity1228 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1230 - { - public int Id { get; set; } + public class RelatedEntity1230 + { + public int Id { get; set; } - public RelatedEntity1229 ParentEntity { get; set; } + public RelatedEntity1229 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1231 - { - public int Id { get; set; } + public class RelatedEntity1231 + { + public int Id { get; set; } - public RelatedEntity1230 ParentEntity { get; set; } + public RelatedEntity1230 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1232 - { - public int Id { get; set; } + public class RelatedEntity1232 + { + public int Id { get; set; } - public RelatedEntity1231 ParentEntity { get; set; } + public RelatedEntity1231 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1233 - { - public int Id { get; set; } + public class RelatedEntity1233 + { + public int Id { get; set; } - public RelatedEntity1232 ParentEntity { get; set; } + public RelatedEntity1232 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1234 - { - public int Id { get; set; } + public class RelatedEntity1234 + { + public int Id { get; set; } - public RelatedEntity1233 ParentEntity { get; set; } + public RelatedEntity1233 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1235 - { - public int Id { get; set; } + public class RelatedEntity1235 + { + public int Id { get; set; } - public RelatedEntity1234 ParentEntity { get; set; } + public RelatedEntity1234 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1236 - { - public int Id { get; set; } + public class RelatedEntity1236 + { + public int Id { get; set; } - public RelatedEntity1235 ParentEntity { get; set; } + public RelatedEntity1235 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1237 - { - public int Id { get; set; } + public class RelatedEntity1237 + { + public int Id { get; set; } - public RelatedEntity1236 ParentEntity { get; set; } + public RelatedEntity1236 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1238 - { - public int Id { get; set; } + public class RelatedEntity1238 + { + public int Id { get; set; } - public RelatedEntity1237 ParentEntity { get; set; } + public RelatedEntity1237 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1239 - { - public int Id { get; set; } + public class RelatedEntity1239 + { + public int Id { get; set; } - public RelatedEntity1238 ParentEntity { get; set; } + public RelatedEntity1238 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1240 - { - public int Id { get; set; } + public class RelatedEntity1240 + { + public int Id { get; set; } - public RelatedEntity1239 ParentEntity { get; set; } + public RelatedEntity1239 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1241 - { - public int Id { get; set; } + public class RelatedEntity1241 + { + public int Id { get; set; } - public RelatedEntity1240 ParentEntity { get; set; } + public RelatedEntity1240 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1242 - { - public int Id { get; set; } + public class RelatedEntity1242 + { + public int Id { get; set; } - public RelatedEntity1241 ParentEntity { get; set; } + public RelatedEntity1241 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1243 - { - public int Id { get; set; } + public class RelatedEntity1243 + { + public int Id { get; set; } - public RelatedEntity1242 ParentEntity { get; set; } + public RelatedEntity1242 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1244 - { - public int Id { get; set; } + public class RelatedEntity1244 + { + public int Id { get; set; } - public RelatedEntity1243 ParentEntity { get; set; } + public RelatedEntity1243 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1245 - { - public int Id { get; set; } + public class RelatedEntity1245 + { + public int Id { get; set; } - public RelatedEntity1244 ParentEntity { get; set; } + public RelatedEntity1244 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1246 - { - public int Id { get; set; } + public class RelatedEntity1246 + { + public int Id { get; set; } - public RelatedEntity1245 ParentEntity { get; set; } + public RelatedEntity1245 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1247 - { - public int Id { get; set; } + public class RelatedEntity1247 + { + public int Id { get; set; } - public RelatedEntity1246 ParentEntity { get; set; } + public RelatedEntity1246 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1248 - { - public int Id { get; set; } + public class RelatedEntity1248 + { + public int Id { get; set; } - public RelatedEntity1247 ParentEntity { get; set; } + public RelatedEntity1247 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1249 - { - public int Id { get; set; } + public class RelatedEntity1249 + { + public int Id { get; set; } - public RelatedEntity1248 ParentEntity { get; set; } + public RelatedEntity1248 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1250 - { - public int Id { get; set; } + public class RelatedEntity1250 + { + public int Id { get; set; } - public RelatedEntity1249 ParentEntity { get; set; } + public RelatedEntity1249 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1251 - { - public int Id { get; set; } + public class RelatedEntity1251 + { + public int Id { get; set; } - public RelatedEntity1250 ParentEntity { get; set; } + public RelatedEntity1250 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1252 - { - public int Id { get; set; } + public class RelatedEntity1252 + { + public int Id { get; set; } - public RelatedEntity1251 ParentEntity { get; set; } + public RelatedEntity1251 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1253 - { - public int Id { get; set; } + public class RelatedEntity1253 + { + public int Id { get; set; } - public RelatedEntity1252 ParentEntity { get; set; } + public RelatedEntity1252 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1254 - { - public int Id { get; set; } + public class RelatedEntity1254 + { + public int Id { get; set; } - public RelatedEntity1253 ParentEntity { get; set; } + public RelatedEntity1253 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1255 - { - public int Id { get; set; } + public class RelatedEntity1255 + { + public int Id { get; set; } - public RelatedEntity1254 ParentEntity { get; set; } + public RelatedEntity1254 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1256 - { - public int Id { get; set; } + public class RelatedEntity1256 + { + public int Id { get; set; } - public RelatedEntity1255 ParentEntity { get; set; } + public RelatedEntity1255 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1257 - { - public int Id { get; set; } + public class RelatedEntity1257 + { + public int Id { get; set; } - public RelatedEntity1256 ParentEntity { get; set; } + public RelatedEntity1256 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1258 - { - public int Id { get; set; } + public class RelatedEntity1258 + { + public int Id { get; set; } - public RelatedEntity1257 ParentEntity { get; set; } + public RelatedEntity1257 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1259 - { - public int Id { get; set; } + public class RelatedEntity1259 + { + public int Id { get; set; } - public RelatedEntity1258 ParentEntity { get; set; } + public RelatedEntity1258 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1260 - { - public int Id { get; set; } + public class RelatedEntity1260 + { + public int Id { get; set; } - public RelatedEntity1259 ParentEntity { get; set; } + public RelatedEntity1259 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1261 - { - public int Id { get; set; } + public class RelatedEntity1261 + { + public int Id { get; set; } - public RelatedEntity1260 ParentEntity { get; set; } + public RelatedEntity1260 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1262 - { - public int Id { get; set; } + public class RelatedEntity1262 + { + public int Id { get; set; } - public RelatedEntity1261 ParentEntity { get; set; } + public RelatedEntity1261 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1263 - { - public int Id { get; set; } + public class RelatedEntity1263 + { + public int Id { get; set; } - public RelatedEntity1262 ParentEntity { get; set; } + public RelatedEntity1262 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1264 - { - public int Id { get; set; } + public class RelatedEntity1264 + { + public int Id { get; set; } - public RelatedEntity1263 ParentEntity { get; set; } + public RelatedEntity1263 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1265 - { - public int Id { get; set; } + public class RelatedEntity1265 + { + public int Id { get; set; } - public RelatedEntity1264 ParentEntity { get; set; } + public RelatedEntity1264 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1266 - { - public int Id { get; set; } + public class RelatedEntity1266 + { + public int Id { get; set; } - public RelatedEntity1265 ParentEntity { get; set; } + public RelatedEntity1265 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1267 - { - public int Id { get; set; } + public class RelatedEntity1267 + { + public int Id { get; set; } - public RelatedEntity1266 ParentEntity { get; set; } + public RelatedEntity1266 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1268 - { - public int Id { get; set; } + public class RelatedEntity1268 + { + public int Id { get; set; } - public RelatedEntity1267 ParentEntity { get; set; } + public RelatedEntity1267 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1269 - { - public int Id { get; set; } + public class RelatedEntity1269 + { + public int Id { get; set; } - public RelatedEntity1268 ParentEntity { get; set; } + public RelatedEntity1268 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1270 - { - public int Id { get; set; } + public class RelatedEntity1270 + { + public int Id { get; set; } - public RelatedEntity1269 ParentEntity { get; set; } + public RelatedEntity1269 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1271 - { - public int Id { get; set; } + public class RelatedEntity1271 + { + public int Id { get; set; } - public RelatedEntity1270 ParentEntity { get; set; } + public RelatedEntity1270 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1272 - { - public int Id { get; set; } + public class RelatedEntity1272 + { + public int Id { get; set; } - public RelatedEntity1271 ParentEntity { get; set; } + public RelatedEntity1271 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1273 - { - public int Id { get; set; } + public class RelatedEntity1273 + { + public int Id { get; set; } - public RelatedEntity1272 ParentEntity { get; set; } + public RelatedEntity1272 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1274 - { - public int Id { get; set; } + public class RelatedEntity1274 + { + public int Id { get; set; } - public RelatedEntity1273 ParentEntity { get; set; } + public RelatedEntity1273 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1275 - { - public int Id { get; set; } + public class RelatedEntity1275 + { + public int Id { get; set; } - public RelatedEntity1274 ParentEntity { get; set; } + public RelatedEntity1274 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1276 - { - public int Id { get; set; } + public class RelatedEntity1276 + { + public int Id { get; set; } - public RelatedEntity1275 ParentEntity { get; set; } + public RelatedEntity1275 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1277 - { - public int Id { get; set; } + public class RelatedEntity1277 + { + public int Id { get; set; } - public RelatedEntity1276 ParentEntity { get; set; } + public RelatedEntity1276 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1278 - { - public int Id { get; set; } + public class RelatedEntity1278 + { + public int Id { get; set; } - public RelatedEntity1277 ParentEntity { get; set; } + public RelatedEntity1277 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1279 - { - public int Id { get; set; } + public class RelatedEntity1279 + { + public int Id { get; set; } - public RelatedEntity1278 ParentEntity { get; set; } + public RelatedEntity1278 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1280 - { - public int Id { get; set; } + public class RelatedEntity1280 + { + public int Id { get; set; } - public RelatedEntity1279 ParentEntity { get; set; } + public RelatedEntity1279 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1281 - { - public int Id { get; set; } + public class RelatedEntity1281 + { + public int Id { get; set; } - public RelatedEntity1280 ParentEntity { get; set; } + public RelatedEntity1280 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1282 - { - public int Id { get; set; } + public class RelatedEntity1282 + { + public int Id { get; set; } - public RelatedEntity1281 ParentEntity { get; set; } + public RelatedEntity1281 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1283 - { - public int Id { get; set; } + public class RelatedEntity1283 + { + public int Id { get; set; } - public RelatedEntity1282 ParentEntity { get; set; } + public RelatedEntity1282 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1284 - { - public int Id { get; set; } + public class RelatedEntity1284 + { + public int Id { get; set; } - public RelatedEntity1283 ParentEntity { get; set; } + public RelatedEntity1283 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1285 - { - public int Id { get; set; } + public class RelatedEntity1285 + { + public int Id { get; set; } - public RelatedEntity1284 ParentEntity { get; set; } + public RelatedEntity1284 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1286 - { - public int Id { get; set; } + public class RelatedEntity1286 + { + public int Id { get; set; } - public RelatedEntity1285 ParentEntity { get; set; } + public RelatedEntity1285 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1287 - { - public int Id { get; set; } + public class RelatedEntity1287 + { + public int Id { get; set; } - public RelatedEntity1286 ParentEntity { get; set; } + public RelatedEntity1286 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1288 - { - public int Id { get; set; } + public class RelatedEntity1288 + { + public int Id { get; set; } - public RelatedEntity1287 ParentEntity { get; set; } + public RelatedEntity1287 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1289 - { - public int Id { get; set; } + public class RelatedEntity1289 + { + public int Id { get; set; } - public RelatedEntity1288 ParentEntity { get; set; } + public RelatedEntity1288 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1290 - { - public int Id { get; set; } + public class RelatedEntity1290 + { + public int Id { get; set; } - public RelatedEntity1289 ParentEntity { get; set; } + public RelatedEntity1289 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1291 - { - public int Id { get; set; } + public class RelatedEntity1291 + { + public int Id { get; set; } - public RelatedEntity1290 ParentEntity { get; set; } + public RelatedEntity1290 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1292 - { - public int Id { get; set; } + public class RelatedEntity1292 + { + public int Id { get; set; } - public RelatedEntity1291 ParentEntity { get; set; } + public RelatedEntity1291 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1293 - { - public int Id { get; set; } + public class RelatedEntity1293 + { + public int Id { get; set; } - public RelatedEntity1292 ParentEntity { get; set; } + public RelatedEntity1292 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1294 - { - public int Id { get; set; } + public class RelatedEntity1294 + { + public int Id { get; set; } - public RelatedEntity1293 ParentEntity { get; set; } + public RelatedEntity1293 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1295 - { - public int Id { get; set; } + public class RelatedEntity1295 + { + public int Id { get; set; } - public RelatedEntity1294 ParentEntity { get; set; } + public RelatedEntity1294 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1296 - { - public int Id { get; set; } + public class RelatedEntity1296 + { + public int Id { get; set; } - public RelatedEntity1295 ParentEntity { get; set; } + public RelatedEntity1295 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1297 - { - public int Id { get; set; } + public class RelatedEntity1297 + { + public int Id { get; set; } - public RelatedEntity1296 ParentEntity { get; set; } + public RelatedEntity1296 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1298 - { - public int Id { get; set; } + public class RelatedEntity1298 + { + public int Id { get; set; } - public RelatedEntity1297 ParentEntity { get; set; } + public RelatedEntity1297 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1299 - { - public int Id { get; set; } + public class RelatedEntity1299 + { + public int Id { get; set; } - public RelatedEntity1298 ParentEntity { get; set; } + public RelatedEntity1298 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1300 - { - public int Id { get; set; } + public class RelatedEntity1300 + { + public int Id { get; set; } - public RelatedEntity1299 ParentEntity { get; set; } + public RelatedEntity1299 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1301 - { - public int Id { get; set; } + public class RelatedEntity1301 + { + public int Id { get; set; } - public RelatedEntity1300 ParentEntity { get; set; } + public RelatedEntity1300 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1302 - { - public int Id { get; set; } + public class RelatedEntity1302 + { + public int Id { get; set; } - public RelatedEntity1301 ParentEntity { get; set; } + public RelatedEntity1301 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1303 - { - public int Id { get; set; } + public class RelatedEntity1303 + { + public int Id { get; set; } - public RelatedEntity1302 ParentEntity { get; set; } + public RelatedEntity1302 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1304 - { - public int Id { get; set; } + public class RelatedEntity1304 + { + public int Id { get; set; } - public RelatedEntity1303 ParentEntity { get; set; } + public RelatedEntity1303 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1305 - { - public int Id { get; set; } + public class RelatedEntity1305 + { + public int Id { get; set; } - public RelatedEntity1304 ParentEntity { get; set; } + public RelatedEntity1304 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1306 - { - public int Id { get; set; } + public class RelatedEntity1306 + { + public int Id { get; set; } - public RelatedEntity1305 ParentEntity { get; set; } + public RelatedEntity1305 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1307 - { - public int Id { get; set; } + public class RelatedEntity1307 + { + public int Id { get; set; } - public RelatedEntity1306 ParentEntity { get; set; } + public RelatedEntity1306 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1308 - { - public int Id { get; set; } + public class RelatedEntity1308 + { + public int Id { get; set; } - public RelatedEntity1307 ParentEntity { get; set; } + public RelatedEntity1307 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1309 - { - public int Id { get; set; } + public class RelatedEntity1309 + { + public int Id { get; set; } - public RelatedEntity1308 ParentEntity { get; set; } + public RelatedEntity1308 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1310 - { - public int Id { get; set; } + public class RelatedEntity1310 + { + public int Id { get; set; } - public RelatedEntity1309 ParentEntity { get; set; } + public RelatedEntity1309 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1311 - { - public int Id { get; set; } + public class RelatedEntity1311 + { + public int Id { get; set; } - public RelatedEntity1310 ParentEntity { get; set; } + public RelatedEntity1310 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1312 - { - public int Id { get; set; } + public class RelatedEntity1312 + { + public int Id { get; set; } - public RelatedEntity1311 ParentEntity { get; set; } + public RelatedEntity1311 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1313 - { - public int Id { get; set; } + public class RelatedEntity1313 + { + public int Id { get; set; } - public RelatedEntity1312 ParentEntity { get; set; } + public RelatedEntity1312 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1314 - { - public int Id { get; set; } + public class RelatedEntity1314 + { + public int Id { get; set; } - public RelatedEntity1313 ParentEntity { get; set; } + public RelatedEntity1313 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1315 - { - public int Id { get; set; } + public class RelatedEntity1315 + { + public int Id { get; set; } - public RelatedEntity1314 ParentEntity { get; set; } + public RelatedEntity1314 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1316 - { - public int Id { get; set; } + public class RelatedEntity1316 + { + public int Id { get; set; } - public RelatedEntity1315 ParentEntity { get; set; } + public RelatedEntity1315 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1317 - { - public int Id { get; set; } + public class RelatedEntity1317 + { + public int Id { get; set; } - public RelatedEntity1316 ParentEntity { get; set; } + public RelatedEntity1316 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1318 - { - public int Id { get; set; } + public class RelatedEntity1318 + { + public int Id { get; set; } - public RelatedEntity1317 ParentEntity { get; set; } + public RelatedEntity1317 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1319 - { - public int Id { get; set; } + public class RelatedEntity1319 + { + public int Id { get; set; } - public RelatedEntity1318 ParentEntity { get; set; } + public RelatedEntity1318 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1320 - { - public int Id { get; set; } + public class RelatedEntity1320 + { + public int Id { get; set; } - public RelatedEntity1319 ParentEntity { get; set; } + public RelatedEntity1319 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1321 - { - public int Id { get; set; } + public class RelatedEntity1321 + { + public int Id { get; set; } - public RelatedEntity1320 ParentEntity { get; set; } + public RelatedEntity1320 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1322 - { - public int Id { get; set; } + public class RelatedEntity1322 + { + public int Id { get; set; } - public RelatedEntity1321 ParentEntity { get; set; } + public RelatedEntity1321 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1323 - { - public int Id { get; set; } + public class RelatedEntity1323 + { + public int Id { get; set; } - public RelatedEntity1322 ParentEntity { get; set; } + public RelatedEntity1322 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1324 - { - public int Id { get; set; } + public class RelatedEntity1324 + { + public int Id { get; set; } - public RelatedEntity1323 ParentEntity { get; set; } + public RelatedEntity1323 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1325 - { - public int Id { get; set; } + public class RelatedEntity1325 + { + public int Id { get; set; } - public RelatedEntity1324 ParentEntity { get; set; } + public RelatedEntity1324 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1326 - { - public int Id { get; set; } + public class RelatedEntity1326 + { + public int Id { get; set; } - public RelatedEntity1325 ParentEntity { get; set; } + public RelatedEntity1325 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1327 - { - public int Id { get; set; } + public class RelatedEntity1327 + { + public int Id { get; set; } - public RelatedEntity1326 ParentEntity { get; set; } + public RelatedEntity1326 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1328 - { - public int Id { get; set; } + public class RelatedEntity1328 + { + public int Id { get; set; } - public RelatedEntity1327 ParentEntity { get; set; } + public RelatedEntity1327 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1329 - { - public int Id { get; set; } + public class RelatedEntity1329 + { + public int Id { get; set; } - public RelatedEntity1328 ParentEntity { get; set; } + public RelatedEntity1328 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1330 - { - public int Id { get; set; } + public class RelatedEntity1330 + { + public int Id { get; set; } - public RelatedEntity1329 ParentEntity { get; set; } + public RelatedEntity1329 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1331 - { - public int Id { get; set; } + public class RelatedEntity1331 + { + public int Id { get; set; } - public RelatedEntity1330 ParentEntity { get; set; } + public RelatedEntity1330 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1332 - { - public int Id { get; set; } + public class RelatedEntity1332 + { + public int Id { get; set; } - public RelatedEntity1331 ParentEntity { get; set; } + public RelatedEntity1331 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1333 - { - public int Id { get; set; } + public class RelatedEntity1333 + { + public int Id { get; set; } - public RelatedEntity1332 ParentEntity { get; set; } + public RelatedEntity1332 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1334 - { - public int Id { get; set; } + public class RelatedEntity1334 + { + public int Id { get; set; } - public RelatedEntity1333 ParentEntity { get; set; } + public RelatedEntity1333 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1335 - { - public int Id { get; set; } + public class RelatedEntity1335 + { + public int Id { get; set; } - public RelatedEntity1334 ParentEntity { get; set; } + public RelatedEntity1334 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1336 - { - public int Id { get; set; } + public class RelatedEntity1336 + { + public int Id { get; set; } - public RelatedEntity1335 ParentEntity { get; set; } + public RelatedEntity1335 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1337 - { - public int Id { get; set; } + public class RelatedEntity1337 + { + public int Id { get; set; } - public RelatedEntity1336 ParentEntity { get; set; } + public RelatedEntity1336 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1338 - { - public int Id { get; set; } + public class RelatedEntity1338 + { + public int Id { get; set; } - public RelatedEntity1337 ParentEntity { get; set; } + public RelatedEntity1337 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1339 - { - public int Id { get; set; } + public class RelatedEntity1339 + { + public int Id { get; set; } - public RelatedEntity1338 ParentEntity { get; set; } + public RelatedEntity1338 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1340 - { - public int Id { get; set; } + public class RelatedEntity1340 + { + public int Id { get; set; } - public RelatedEntity1339 ParentEntity { get; set; } + public RelatedEntity1339 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1341 - { - public int Id { get; set; } + public class RelatedEntity1341 + { + public int Id { get; set; } - public RelatedEntity1340 ParentEntity { get; set; } + public RelatedEntity1340 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1342 - { - public int Id { get; set; } + public class RelatedEntity1342 + { + public int Id { get; set; } - public RelatedEntity1341 ParentEntity { get; set; } + public RelatedEntity1341 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1343 - { - public int Id { get; set; } + public class RelatedEntity1343 + { + public int Id { get; set; } - public RelatedEntity1342 ParentEntity { get; set; } + public RelatedEntity1342 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1344 - { - public int Id { get; set; } + public class RelatedEntity1344 + { + public int Id { get; set; } - public RelatedEntity1343 ParentEntity { get; set; } + public RelatedEntity1343 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1345 - { - public int Id { get; set; } + public class RelatedEntity1345 + { + public int Id { get; set; } - public RelatedEntity1344 ParentEntity { get; set; } + public RelatedEntity1344 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1346 - { - public int Id { get; set; } + public class RelatedEntity1346 + { + public int Id { get; set; } - public RelatedEntity1345 ParentEntity { get; set; } + public RelatedEntity1345 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1347 - { - public int Id { get; set; } + public class RelatedEntity1347 + { + public int Id { get; set; } - public RelatedEntity1346 ParentEntity { get; set; } + public RelatedEntity1346 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1348 - { - public int Id { get; set; } + public class RelatedEntity1348 + { + public int Id { get; set; } - public RelatedEntity1347 ParentEntity { get; set; } + public RelatedEntity1347 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1349 - { - public int Id { get; set; } + public class RelatedEntity1349 + { + public int Id { get; set; } - public RelatedEntity1348 ParentEntity { get; set; } + public RelatedEntity1348 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1350 - { - public int Id { get; set; } + public class RelatedEntity1350 + { + public int Id { get; set; } - public RelatedEntity1349 ParentEntity { get; set; } + public RelatedEntity1349 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1351 - { - public int Id { get; set; } + public class RelatedEntity1351 + { + public int Id { get; set; } - public RelatedEntity1350 ParentEntity { get; set; } + public RelatedEntity1350 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1352 - { - public int Id { get; set; } + public class RelatedEntity1352 + { + public int Id { get; set; } - public RelatedEntity1351 ParentEntity { get; set; } + public RelatedEntity1351 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1353 - { - public int Id { get; set; } + public class RelatedEntity1353 + { + public int Id { get; set; } - public RelatedEntity1352 ParentEntity { get; set; } + public RelatedEntity1352 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1354 - { - public int Id { get; set; } + public class RelatedEntity1354 + { + public int Id { get; set; } - public RelatedEntity1353 ParentEntity { get; set; } + public RelatedEntity1353 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1355 - { - public int Id { get; set; } + public class RelatedEntity1355 + { + public int Id { get; set; } - public RelatedEntity1354 ParentEntity { get; set; } + public RelatedEntity1354 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1356 - { - public int Id { get; set; } + public class RelatedEntity1356 + { + public int Id { get; set; } - public RelatedEntity1355 ParentEntity { get; set; } + public RelatedEntity1355 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1357 - { - public int Id { get; set; } + public class RelatedEntity1357 + { + public int Id { get; set; } - public RelatedEntity1356 ParentEntity { get; set; } + public RelatedEntity1356 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1358 - { - public int Id { get; set; } + public class RelatedEntity1358 + { + public int Id { get; set; } - public RelatedEntity1357 ParentEntity { get; set; } + public RelatedEntity1357 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1359 - { - public int Id { get; set; } + public class RelatedEntity1359 + { + public int Id { get; set; } - public RelatedEntity1358 ParentEntity { get; set; } + public RelatedEntity1358 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1360 - { - public int Id { get; set; } + public class RelatedEntity1360 + { + public int Id { get; set; } - public RelatedEntity1359 ParentEntity { get; set; } + public RelatedEntity1359 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1361 - { - public int Id { get; set; } + public class RelatedEntity1361 + { + public int Id { get; set; } - public RelatedEntity1360 ParentEntity { get; set; } + public RelatedEntity1360 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1362 - { - public int Id { get; set; } + public class RelatedEntity1362 + { + public int Id { get; set; } - public RelatedEntity1361 ParentEntity { get; set; } + public RelatedEntity1361 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1363 - { - public int Id { get; set; } + public class RelatedEntity1363 + { + public int Id { get; set; } - public RelatedEntity1362 ParentEntity { get; set; } + public RelatedEntity1362 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1364 - { - public int Id { get; set; } + public class RelatedEntity1364 + { + public int Id { get; set; } - public RelatedEntity1363 ParentEntity { get; set; } + public RelatedEntity1363 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1365 - { - public int Id { get; set; } + public class RelatedEntity1365 + { + public int Id { get; set; } - public RelatedEntity1364 ParentEntity { get; set; } + public RelatedEntity1364 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1366 - { - public int Id { get; set; } + public class RelatedEntity1366 + { + public int Id { get; set; } - public RelatedEntity1365 ParentEntity { get; set; } + public RelatedEntity1365 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1367 - { - public int Id { get; set; } + public class RelatedEntity1367 + { + public int Id { get; set; } - public RelatedEntity1366 ParentEntity { get; set; } + public RelatedEntity1366 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1368 - { - public int Id { get; set; } + public class RelatedEntity1368 + { + public int Id { get; set; } - public RelatedEntity1367 ParentEntity { get; set; } + public RelatedEntity1367 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1369 - { - public int Id { get; set; } + public class RelatedEntity1369 + { + public int Id { get; set; } - public RelatedEntity1368 ParentEntity { get; set; } + public RelatedEntity1368 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1370 - { - public int Id { get; set; } + public class RelatedEntity1370 + { + public int Id { get; set; } - public RelatedEntity1369 ParentEntity { get; set; } + public RelatedEntity1369 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1371 - { - public int Id { get; set; } + public class RelatedEntity1371 + { + public int Id { get; set; } - public RelatedEntity1370 ParentEntity { get; set; } + public RelatedEntity1370 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1372 - { - public int Id { get; set; } + public class RelatedEntity1372 + { + public int Id { get; set; } - public RelatedEntity1371 ParentEntity { get; set; } + public RelatedEntity1371 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1373 - { - public int Id { get; set; } + public class RelatedEntity1373 + { + public int Id { get; set; } - public RelatedEntity1372 ParentEntity { get; set; } + public RelatedEntity1372 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1374 - { - public int Id { get; set; } + public class RelatedEntity1374 + { + public int Id { get; set; } - public RelatedEntity1373 ParentEntity { get; set; } + public RelatedEntity1373 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1375 - { - public int Id { get; set; } + public class RelatedEntity1375 + { + public int Id { get; set; } - public RelatedEntity1374 ParentEntity { get; set; } + public RelatedEntity1374 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1376 - { - public int Id { get; set; } + public class RelatedEntity1376 + { + public int Id { get; set; } - public RelatedEntity1375 ParentEntity { get; set; } + public RelatedEntity1375 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1377 - { - public int Id { get; set; } + public class RelatedEntity1377 + { + public int Id { get; set; } - public RelatedEntity1376 ParentEntity { get; set; } + public RelatedEntity1376 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1378 - { - public int Id { get; set; } + public class RelatedEntity1378 + { + public int Id { get; set; } - public RelatedEntity1377 ParentEntity { get; set; } + public RelatedEntity1377 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1379 - { - public int Id { get; set; } + public class RelatedEntity1379 + { + public int Id { get; set; } - public RelatedEntity1378 ParentEntity { get; set; } + public RelatedEntity1378 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1380 - { - public int Id { get; set; } + public class RelatedEntity1380 + { + public int Id { get; set; } - public RelatedEntity1379 ParentEntity { get; set; } + public RelatedEntity1379 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1381 - { - public int Id { get; set; } + public class RelatedEntity1381 + { + public int Id { get; set; } - public RelatedEntity1380 ParentEntity { get; set; } + public RelatedEntity1380 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1382 - { - public int Id { get; set; } + public class RelatedEntity1382 + { + public int Id { get; set; } - public RelatedEntity1381 ParentEntity { get; set; } + public RelatedEntity1381 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1383 - { - public int Id { get; set; } + public class RelatedEntity1383 + { + public int Id { get; set; } - public RelatedEntity1382 ParentEntity { get; set; } + public RelatedEntity1382 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1384 - { - public int Id { get; set; } + public class RelatedEntity1384 + { + public int Id { get; set; } - public RelatedEntity1383 ParentEntity { get; set; } + public RelatedEntity1383 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1385 - { - public int Id { get; set; } + public class RelatedEntity1385 + { + public int Id { get; set; } - public RelatedEntity1384 ParentEntity { get; set; } + public RelatedEntity1384 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1386 - { - public int Id { get; set; } + public class RelatedEntity1386 + { + public int Id { get; set; } - public RelatedEntity1385 ParentEntity { get; set; } + public RelatedEntity1385 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1387 - { - public int Id { get; set; } + public class RelatedEntity1387 + { + public int Id { get; set; } - public RelatedEntity1386 ParentEntity { get; set; } + public RelatedEntity1386 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1388 - { - public int Id { get; set; } + public class RelatedEntity1388 + { + public int Id { get; set; } - public RelatedEntity1387 ParentEntity { get; set; } + public RelatedEntity1387 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1389 - { - public int Id { get; set; } + public class RelatedEntity1389 + { + public int Id { get; set; } - public RelatedEntity1388 ParentEntity { get; set; } + public RelatedEntity1388 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1390 - { - public int Id { get; set; } + public class RelatedEntity1390 + { + public int Id { get; set; } - public RelatedEntity1389 ParentEntity { get; set; } + public RelatedEntity1389 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1391 - { - public int Id { get; set; } + public class RelatedEntity1391 + { + public int Id { get; set; } - public RelatedEntity1390 ParentEntity { get; set; } + public RelatedEntity1390 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1392 - { - public int Id { get; set; } + public class RelatedEntity1392 + { + public int Id { get; set; } - public RelatedEntity1391 ParentEntity { get; set; } + public RelatedEntity1391 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1393 - { - public int Id { get; set; } + public class RelatedEntity1393 + { + public int Id { get; set; } - public RelatedEntity1392 ParentEntity { get; set; } + public RelatedEntity1392 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1394 - { - public int Id { get; set; } + public class RelatedEntity1394 + { + public int Id { get; set; } - public RelatedEntity1393 ParentEntity { get; set; } + public RelatedEntity1393 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1395 - { - public int Id { get; set; } + public class RelatedEntity1395 + { + public int Id { get; set; } - public RelatedEntity1394 ParentEntity { get; set; } + public RelatedEntity1394 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1396 - { - public int Id { get; set; } + public class RelatedEntity1396 + { + public int Id { get; set; } - public RelatedEntity1395 ParentEntity { get; set; } + public RelatedEntity1395 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1397 - { - public int Id { get; set; } + public class RelatedEntity1397 + { + public int Id { get; set; } - public RelatedEntity1396 ParentEntity { get; set; } + public RelatedEntity1396 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1398 - { - public int Id { get; set; } + public class RelatedEntity1398 + { + public int Id { get; set; } - public RelatedEntity1397 ParentEntity { get; set; } + public RelatedEntity1397 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1399 - { - public int Id { get; set; } + public class RelatedEntity1399 + { + public int Id { get; set; } - public RelatedEntity1398 ParentEntity { get; set; } + public RelatedEntity1398 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1400 - { - public int Id { get; set; } + public class RelatedEntity1400 + { + public int Id { get; set; } - public RelatedEntity1399 ParentEntity { get; set; } + public RelatedEntity1399 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1401 - { - public int Id { get; set; } + public class RelatedEntity1401 + { + public int Id { get; set; } - public RelatedEntity1400 ParentEntity { get; set; } + public RelatedEntity1400 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1402 - { - public int Id { get; set; } + public class RelatedEntity1402 + { + public int Id { get; set; } - public RelatedEntity1401 ParentEntity { get; set; } + public RelatedEntity1401 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1403 - { - public int Id { get; set; } + public class RelatedEntity1403 + { + public int Id { get; set; } - public RelatedEntity1402 ParentEntity { get; set; } + public RelatedEntity1402 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1404 - { - public int Id { get; set; } + public class RelatedEntity1404 + { + public int Id { get; set; } - public RelatedEntity1403 ParentEntity { get; set; } + public RelatedEntity1403 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1405 - { - public int Id { get; set; } + public class RelatedEntity1405 + { + public int Id { get; set; } - public RelatedEntity1404 ParentEntity { get; set; } + public RelatedEntity1404 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1406 - { - public int Id { get; set; } + public class RelatedEntity1406 + { + public int Id { get; set; } - public RelatedEntity1405 ParentEntity { get; set; } + public RelatedEntity1405 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1407 - { - public int Id { get; set; } + public class RelatedEntity1407 + { + public int Id { get; set; } - public RelatedEntity1406 ParentEntity { get; set; } + public RelatedEntity1406 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1408 - { - public int Id { get; set; } + public class RelatedEntity1408 + { + public int Id { get; set; } - public RelatedEntity1407 ParentEntity { get; set; } + public RelatedEntity1407 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1409 - { - public int Id { get; set; } + public class RelatedEntity1409 + { + public int Id { get; set; } - public RelatedEntity1408 ParentEntity { get; set; } + public RelatedEntity1408 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1410 - { - public int Id { get; set; } + public class RelatedEntity1410 + { + public int Id { get; set; } - public RelatedEntity1409 ParentEntity { get; set; } + public RelatedEntity1409 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1411 - { - public int Id { get; set; } + public class RelatedEntity1411 + { + public int Id { get; set; } - public RelatedEntity1410 ParentEntity { get; set; } + public RelatedEntity1410 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1412 - { - public int Id { get; set; } + public class RelatedEntity1412 + { + public int Id { get; set; } - public RelatedEntity1411 ParentEntity { get; set; } + public RelatedEntity1411 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1413 - { - public int Id { get; set; } + public class RelatedEntity1413 + { + public int Id { get; set; } - public RelatedEntity1412 ParentEntity { get; set; } + public RelatedEntity1412 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1414 - { - public int Id { get; set; } + public class RelatedEntity1414 + { + public int Id { get; set; } - public RelatedEntity1413 ParentEntity { get; set; } + public RelatedEntity1413 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1415 - { - public int Id { get; set; } + public class RelatedEntity1415 + { + public int Id { get; set; } - public RelatedEntity1414 ParentEntity { get; set; } + public RelatedEntity1414 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1416 - { - public int Id { get; set; } + public class RelatedEntity1416 + { + public int Id { get; set; } - public RelatedEntity1415 ParentEntity { get; set; } + public RelatedEntity1415 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1417 - { - public int Id { get; set; } + public class RelatedEntity1417 + { + public int Id { get; set; } - public RelatedEntity1416 ParentEntity { get; set; } + public RelatedEntity1416 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1418 - { - public int Id { get; set; } + public class RelatedEntity1418 + { + public int Id { get; set; } - public RelatedEntity1417 ParentEntity { get; set; } + public RelatedEntity1417 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1419 - { - public int Id { get; set; } + public class RelatedEntity1419 + { + public int Id { get; set; } - public RelatedEntity1418 ParentEntity { get; set; } + public RelatedEntity1418 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1420 - { - public int Id { get; set; } + public class RelatedEntity1420 + { + public int Id { get; set; } - public RelatedEntity1419 ParentEntity { get; set; } + public RelatedEntity1419 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1421 - { - public int Id { get; set; } + public class RelatedEntity1421 + { + public int Id { get; set; } - public RelatedEntity1420 ParentEntity { get; set; } + public RelatedEntity1420 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1422 - { - public int Id { get; set; } + public class RelatedEntity1422 + { + public int Id { get; set; } - public RelatedEntity1421 ParentEntity { get; set; } + public RelatedEntity1421 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1423 - { - public int Id { get; set; } + public class RelatedEntity1423 + { + public int Id { get; set; } - public RelatedEntity1422 ParentEntity { get; set; } + public RelatedEntity1422 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1424 - { - public int Id { get; set; } + public class RelatedEntity1424 + { + public int Id { get; set; } - public RelatedEntity1423 ParentEntity { get; set; } + public RelatedEntity1423 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1425 - { - public int Id { get; set; } + public class RelatedEntity1425 + { + public int Id { get; set; } - public RelatedEntity1424 ParentEntity { get; set; } + public RelatedEntity1424 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1426 - { - public int Id { get; set; } + public class RelatedEntity1426 + { + public int Id { get; set; } - public RelatedEntity1425 ParentEntity { get; set; } + public RelatedEntity1425 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1427 - { - public int Id { get; set; } + public class RelatedEntity1427 + { + public int Id { get; set; } - public RelatedEntity1426 ParentEntity { get; set; } + public RelatedEntity1426 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1428 - { - public int Id { get; set; } + public class RelatedEntity1428 + { + public int Id { get; set; } - public RelatedEntity1427 ParentEntity { get; set; } + public RelatedEntity1427 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1429 - { - public int Id { get; set; } + public class RelatedEntity1429 + { + public int Id { get; set; } - public RelatedEntity1428 ParentEntity { get; set; } + public RelatedEntity1428 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1430 - { - public int Id { get; set; } + public class RelatedEntity1430 + { + public int Id { get; set; } - public RelatedEntity1429 ParentEntity { get; set; } + public RelatedEntity1429 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1431 - { - public int Id { get; set; } + public class RelatedEntity1431 + { + public int Id { get; set; } - public RelatedEntity1430 ParentEntity { get; set; } + public RelatedEntity1430 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1432 - { - public int Id { get; set; } + public class RelatedEntity1432 + { + public int Id { get; set; } - public RelatedEntity1431 ParentEntity { get; set; } + public RelatedEntity1431 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1433 - { - public int Id { get; set; } + public class RelatedEntity1433 + { + public int Id { get; set; } - public RelatedEntity1432 ParentEntity { get; set; } + public RelatedEntity1432 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1434 - { - public int Id { get; set; } + public class RelatedEntity1434 + { + public int Id { get; set; } - public RelatedEntity1433 ParentEntity { get; set; } + public RelatedEntity1433 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1435 - { - public int Id { get; set; } + public class RelatedEntity1435 + { + public int Id { get; set; } - public RelatedEntity1434 ParentEntity { get; set; } + public RelatedEntity1434 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1436 - { - public int Id { get; set; } + public class RelatedEntity1436 + { + public int Id { get; set; } - public RelatedEntity1435 ParentEntity { get; set; } + public RelatedEntity1435 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1437 - { - public int Id { get; set; } + public class RelatedEntity1437 + { + public int Id { get; set; } - public RelatedEntity1436 ParentEntity { get; set; } + public RelatedEntity1436 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1438 - { - public int Id { get; set; } + public class RelatedEntity1438 + { + public int Id { get; set; } - public RelatedEntity1437 ParentEntity { get; set; } + public RelatedEntity1437 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1439 - { - public int Id { get; set; } + public class RelatedEntity1439 + { + public int Id { get; set; } - public RelatedEntity1438 ParentEntity { get; set; } + public RelatedEntity1438 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1440 - { - public int Id { get; set; } + public class RelatedEntity1440 + { + public int Id { get; set; } - public RelatedEntity1439 ParentEntity { get; set; } + public RelatedEntity1439 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1441 - { - public int Id { get; set; } + public class RelatedEntity1441 + { + public int Id { get; set; } - public RelatedEntity1440 ParentEntity { get; set; } + public RelatedEntity1440 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1442 - { - public int Id { get; set; } + public class RelatedEntity1442 + { + public int Id { get; set; } - public RelatedEntity1441 ParentEntity { get; set; } + public RelatedEntity1441 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1443 - { - public int Id { get; set; } + public class RelatedEntity1443 + { + public int Id { get; set; } - public RelatedEntity1442 ParentEntity { get; set; } + public RelatedEntity1442 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1444 - { - public int Id { get; set; } + public class RelatedEntity1444 + { + public int Id { get; set; } - public RelatedEntity1443 ParentEntity { get; set; } + public RelatedEntity1443 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1445 - { - public int Id { get; set; } + public class RelatedEntity1445 + { + public int Id { get; set; } - public RelatedEntity1444 ParentEntity { get; set; } + public RelatedEntity1444 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1446 - { - public int Id { get; set; } + public class RelatedEntity1446 + { + public int Id { get; set; } - public RelatedEntity1445 ParentEntity { get; set; } + public RelatedEntity1445 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1447 - { - public int Id { get; set; } + public class RelatedEntity1447 + { + public int Id { get; set; } - public RelatedEntity1446 ParentEntity { get; set; } + public RelatedEntity1446 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1448 - { - public int Id { get; set; } + public class RelatedEntity1448 + { + public int Id { get; set; } - public RelatedEntity1447 ParentEntity { get; set; } + public RelatedEntity1447 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1449 - { - public int Id { get; set; } + public class RelatedEntity1449 + { + public int Id { get; set; } - public RelatedEntity1448 ParentEntity { get; set; } + public RelatedEntity1448 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1450 - { - public int Id { get; set; } + public class RelatedEntity1450 + { + public int Id { get; set; } - public RelatedEntity1449 ParentEntity { get; set; } + public RelatedEntity1449 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1451 - { - public int Id { get; set; } + public class RelatedEntity1451 + { + public int Id { get; set; } - public RelatedEntity1450 ParentEntity { get; set; } + public RelatedEntity1450 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1452 - { - public int Id { get; set; } + public class RelatedEntity1452 + { + public int Id { get; set; } - public RelatedEntity1451 ParentEntity { get; set; } + public RelatedEntity1451 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1453 - { - public int Id { get; set; } + public class RelatedEntity1453 + { + public int Id { get; set; } - public RelatedEntity1452 ParentEntity { get; set; } + public RelatedEntity1452 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1454 - { - public int Id { get; set; } + public class RelatedEntity1454 + { + public int Id { get; set; } - public RelatedEntity1453 ParentEntity { get; set; } + public RelatedEntity1453 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1455 - { - public int Id { get; set; } + public class RelatedEntity1455 + { + public int Id { get; set; } - public RelatedEntity1454 ParentEntity { get; set; } + public RelatedEntity1454 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1456 - { - public int Id { get; set; } + public class RelatedEntity1456 + { + public int Id { get; set; } - public RelatedEntity1455 ParentEntity { get; set; } + public RelatedEntity1455 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1457 - { - public int Id { get; set; } + public class RelatedEntity1457 + { + public int Id { get; set; } - public RelatedEntity1456 ParentEntity { get; set; } + public RelatedEntity1456 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1458 - { - public int Id { get; set; } + public class RelatedEntity1458 + { + public int Id { get; set; } - public RelatedEntity1457 ParentEntity { get; set; } + public RelatedEntity1457 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1459 - { - public int Id { get; set; } + public class RelatedEntity1459 + { + public int Id { get; set; } - public RelatedEntity1458 ParentEntity { get; set; } + public RelatedEntity1458 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1460 - { - public int Id { get; set; } + public class RelatedEntity1460 + { + public int Id { get; set; } - public RelatedEntity1459 ParentEntity { get; set; } + public RelatedEntity1459 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1461 - { - public int Id { get; set; } + public class RelatedEntity1461 + { + public int Id { get; set; } - public RelatedEntity1460 ParentEntity { get; set; } + public RelatedEntity1460 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1462 - { - public int Id { get; set; } + public class RelatedEntity1462 + { + public int Id { get; set; } - public RelatedEntity1461 ParentEntity { get; set; } + public RelatedEntity1461 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1463 - { - public int Id { get; set; } + public class RelatedEntity1463 + { + public int Id { get; set; } - public RelatedEntity1462 ParentEntity { get; set; } + public RelatedEntity1462 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1464 - { - public int Id { get; set; } + public class RelatedEntity1464 + { + public int Id { get; set; } - public RelatedEntity1463 ParentEntity { get; set; } + public RelatedEntity1463 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1465 - { - public int Id { get; set; } + public class RelatedEntity1465 + { + public int Id { get; set; } - public RelatedEntity1464 ParentEntity { get; set; } + public RelatedEntity1464 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1466 - { - public int Id { get; set; } + public class RelatedEntity1466 + { + public int Id { get; set; } - public RelatedEntity1465 ParentEntity { get; set; } + public RelatedEntity1465 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1467 - { - public int Id { get; set; } + public class RelatedEntity1467 + { + public int Id { get; set; } - public RelatedEntity1466 ParentEntity { get; set; } + public RelatedEntity1466 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1468 - { - public int Id { get; set; } + public class RelatedEntity1468 + { + public int Id { get; set; } - public RelatedEntity1467 ParentEntity { get; set; } + public RelatedEntity1467 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1469 - { - public int Id { get; set; } + public class RelatedEntity1469 + { + public int Id { get; set; } - public RelatedEntity1468 ParentEntity { get; set; } + public RelatedEntity1468 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1470 - { - public int Id { get; set; } + public class RelatedEntity1470 + { + public int Id { get; set; } - public RelatedEntity1469 ParentEntity { get; set; } + public RelatedEntity1469 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1471 - { - public int Id { get; set; } + public class RelatedEntity1471 + { + public int Id { get; set; } - public RelatedEntity1470 ParentEntity { get; set; } + public RelatedEntity1470 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1472 - { - public int Id { get; set; } + public class RelatedEntity1472 + { + public int Id { get; set; } - public RelatedEntity1471 ParentEntity { get; set; } + public RelatedEntity1471 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1473 - { - public int Id { get; set; } + public class RelatedEntity1473 + { + public int Id { get; set; } - public RelatedEntity1472 ParentEntity { get; set; } + public RelatedEntity1472 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1474 - { - public int Id { get; set; } + public class RelatedEntity1474 + { + public int Id { get; set; } - public RelatedEntity1473 ParentEntity { get; set; } + public RelatedEntity1473 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1475 - { - public int Id { get; set; } + public class RelatedEntity1475 + { + public int Id { get; set; } - public RelatedEntity1474 ParentEntity { get; set; } + public RelatedEntity1474 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1476 - { - public int Id { get; set; } + public class RelatedEntity1476 + { + public int Id { get; set; } - public RelatedEntity1475 ParentEntity { get; set; } + public RelatedEntity1475 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1477 - { - public int Id { get; set; } + public class RelatedEntity1477 + { + public int Id { get; set; } - public RelatedEntity1476 ParentEntity { get; set; } + public RelatedEntity1476 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1478 - { - public int Id { get; set; } + public class RelatedEntity1478 + { + public int Id { get; set; } - public RelatedEntity1477 ParentEntity { get; set; } + public RelatedEntity1477 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1479 - { - public int Id { get; set; } + public class RelatedEntity1479 + { + public int Id { get; set; } - public RelatedEntity1478 ParentEntity { get; set; } + public RelatedEntity1478 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1480 - { - public int Id { get; set; } + public class RelatedEntity1480 + { + public int Id { get; set; } - public RelatedEntity1479 ParentEntity { get; set; } + public RelatedEntity1479 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1481 - { - public int Id { get; set; } + public class RelatedEntity1481 + { + public int Id { get; set; } - public RelatedEntity1480 ParentEntity { get; set; } + public RelatedEntity1480 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1482 - { - public int Id { get; set; } + public class RelatedEntity1482 + { + public int Id { get; set; } - public RelatedEntity1481 ParentEntity { get; set; } + public RelatedEntity1481 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1483 - { - public int Id { get; set; } + public class RelatedEntity1483 + { + public int Id { get; set; } - public RelatedEntity1482 ParentEntity { get; set; } + public RelatedEntity1482 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1484 - { - public int Id { get; set; } + public class RelatedEntity1484 + { + public int Id { get; set; } - public RelatedEntity1483 ParentEntity { get; set; } + public RelatedEntity1483 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1485 - { - public int Id { get; set; } + public class RelatedEntity1485 + { + public int Id { get; set; } - public RelatedEntity1484 ParentEntity { get; set; } + public RelatedEntity1484 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1486 - { - public int Id { get; set; } + public class RelatedEntity1486 + { + public int Id { get; set; } - public RelatedEntity1485 ParentEntity { get; set; } + public RelatedEntity1485 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1487 - { - public int Id { get; set; } + public class RelatedEntity1487 + { + public int Id { get; set; } - public RelatedEntity1486 ParentEntity { get; set; } + public RelatedEntity1486 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1488 - { - public int Id { get; set; } + public class RelatedEntity1488 + { + public int Id { get; set; } - public RelatedEntity1487 ParentEntity { get; set; } + public RelatedEntity1487 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1489 - { - public int Id { get; set; } + public class RelatedEntity1489 + { + public int Id { get; set; } - public RelatedEntity1488 ParentEntity { get; set; } + public RelatedEntity1488 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1490 - { - public int Id { get; set; } + public class RelatedEntity1490 + { + public int Id { get; set; } - public RelatedEntity1489 ParentEntity { get; set; } + public RelatedEntity1489 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1491 - { - public int Id { get; set; } + public class RelatedEntity1491 + { + public int Id { get; set; } - public RelatedEntity1490 ParentEntity { get; set; } + public RelatedEntity1490 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1492 - { - public int Id { get; set; } + public class RelatedEntity1492 + { + public int Id { get; set; } - public RelatedEntity1491 ParentEntity { get; set; } + public RelatedEntity1491 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1493 - { - public int Id { get; set; } + public class RelatedEntity1493 + { + public int Id { get; set; } - public RelatedEntity1492 ParentEntity { get; set; } + public RelatedEntity1492 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1494 - { - public int Id { get; set; } + public class RelatedEntity1494 + { + public int Id { get; set; } - public RelatedEntity1493 ParentEntity { get; set; } + public RelatedEntity1493 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1495 - { - public int Id { get; set; } + public class RelatedEntity1495 + { + public int Id { get; set; } - public RelatedEntity1494 ParentEntity { get; set; } + public RelatedEntity1494 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1496 - { - public int Id { get; set; } + public class RelatedEntity1496 + { + public int Id { get; set; } - public RelatedEntity1495 ParentEntity { get; set; } + public RelatedEntity1495 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1497 - { - public int Id { get; set; } + public class RelatedEntity1497 + { + public int Id { get; set; } - public RelatedEntity1496 ParentEntity { get; set; } + public RelatedEntity1496 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1498 - { - public int Id { get; set; } + public class RelatedEntity1498 + { + public int Id { get; set; } - public RelatedEntity1497 ParentEntity { get; set; } + public RelatedEntity1497 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1499 - { - public int Id { get; set; } + public class RelatedEntity1499 + { + public int Id { get; set; } - public RelatedEntity1498 ParentEntity { get; set; } + public RelatedEntity1498 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1500 - { - public int Id { get; set; } + public class RelatedEntity1500 + { + public int Id { get; set; } - public RelatedEntity1499 ParentEntity { get; set; } + public RelatedEntity1499 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1501 - { - public int Id { get; set; } + public class RelatedEntity1501 + { + public int Id { get; set; } - public RelatedEntity1500 ParentEntity { get; set; } + public RelatedEntity1500 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1502 - { - public int Id { get; set; } + public class RelatedEntity1502 + { + public int Id { get; set; } - public RelatedEntity1501 ParentEntity { get; set; } + public RelatedEntity1501 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1503 - { - public int Id { get; set; } + public class RelatedEntity1503 + { + public int Id { get; set; } - public RelatedEntity1502 ParentEntity { get; set; } + public RelatedEntity1502 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1504 - { - public int Id { get; set; } + public class RelatedEntity1504 + { + public int Id { get; set; } - public RelatedEntity1503 ParentEntity { get; set; } + public RelatedEntity1503 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1505 - { - public int Id { get; set; } + public class RelatedEntity1505 + { + public int Id { get; set; } - public RelatedEntity1504 ParentEntity { get; set; } + public RelatedEntity1504 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1506 - { - public int Id { get; set; } + public class RelatedEntity1506 + { + public int Id { get; set; } - public RelatedEntity1505 ParentEntity { get; set; } + public RelatedEntity1505 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1507 - { - public int Id { get; set; } + public class RelatedEntity1507 + { + public int Id { get; set; } - public RelatedEntity1506 ParentEntity { get; set; } + public RelatedEntity1506 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1508 - { - public int Id { get; set; } + public class RelatedEntity1508 + { + public int Id { get; set; } - public RelatedEntity1507 ParentEntity { get; set; } + public RelatedEntity1507 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1509 - { - public int Id { get; set; } + public class RelatedEntity1509 + { + public int Id { get; set; } - public RelatedEntity1508 ParentEntity { get; set; } + public RelatedEntity1508 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1510 - { - public int Id { get; set; } + public class RelatedEntity1510 + { + public int Id { get; set; } - public RelatedEntity1509 ParentEntity { get; set; } + public RelatedEntity1509 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1511 - { - public int Id { get; set; } + public class RelatedEntity1511 + { + public int Id { get; set; } - public RelatedEntity1510 ParentEntity { get; set; } + public RelatedEntity1510 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1512 - { - public int Id { get; set; } + public class RelatedEntity1512 + { + public int Id { get; set; } - public RelatedEntity1511 ParentEntity { get; set; } + public RelatedEntity1511 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1513 - { - public int Id { get; set; } + public class RelatedEntity1513 + { + public int Id { get; set; } - public RelatedEntity1512 ParentEntity { get; set; } + public RelatedEntity1512 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1514 - { - public int Id { get; set; } + public class RelatedEntity1514 + { + public int Id { get; set; } - public RelatedEntity1513 ParentEntity { get; set; } + public RelatedEntity1513 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1515 - { - public int Id { get; set; } + public class RelatedEntity1515 + { + public int Id { get; set; } - public RelatedEntity1514 ParentEntity { get; set; } + public RelatedEntity1514 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1516 - { - public int Id { get; set; } + public class RelatedEntity1516 + { + public int Id { get; set; } - public RelatedEntity1515 ParentEntity { get; set; } + public RelatedEntity1515 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1517 - { - public int Id { get; set; } + public class RelatedEntity1517 + { + public int Id { get; set; } - public RelatedEntity1516 ParentEntity { get; set; } + public RelatedEntity1516 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1518 - { - public int Id { get; set; } + public class RelatedEntity1518 + { + public int Id { get; set; } - public RelatedEntity1517 ParentEntity { get; set; } + public RelatedEntity1517 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1519 - { - public int Id { get; set; } + public class RelatedEntity1519 + { + public int Id { get; set; } - public RelatedEntity1518 ParentEntity { get; set; } + public RelatedEntity1518 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1520 - { - public int Id { get; set; } + public class RelatedEntity1520 + { + public int Id { get; set; } - public RelatedEntity1519 ParentEntity { get; set; } + public RelatedEntity1519 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1521 - { - public int Id { get; set; } + public class RelatedEntity1521 + { + public int Id { get; set; } - public RelatedEntity1520 ParentEntity { get; set; } + public RelatedEntity1520 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1522 - { - public int Id { get; set; } + public class RelatedEntity1522 + { + public int Id { get; set; } - public RelatedEntity1521 ParentEntity { get; set; } + public RelatedEntity1521 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1523 - { - public int Id { get; set; } + public class RelatedEntity1523 + { + public int Id { get; set; } - public RelatedEntity1522 ParentEntity { get; set; } + public RelatedEntity1522 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1524 - { - public int Id { get; set; } + public class RelatedEntity1524 + { + public int Id { get; set; } - public RelatedEntity1523 ParentEntity { get; set; } + public RelatedEntity1523 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1525 - { - public int Id { get; set; } + public class RelatedEntity1525 + { + public int Id { get; set; } - public RelatedEntity1524 ParentEntity { get; set; } + public RelatedEntity1524 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1526 - { - public int Id { get; set; } + public class RelatedEntity1526 + { + public int Id { get; set; } - public RelatedEntity1525 ParentEntity { get; set; } + public RelatedEntity1525 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1527 - { - public int Id { get; set; } + public class RelatedEntity1527 + { + public int Id { get; set; } - public RelatedEntity1526 ParentEntity { get; set; } + public RelatedEntity1526 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1528 - { - public int Id { get; set; } + public class RelatedEntity1528 + { + public int Id { get; set; } - public RelatedEntity1527 ParentEntity { get; set; } + public RelatedEntity1527 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1529 - { - public int Id { get; set; } + public class RelatedEntity1529 + { + public int Id { get; set; } - public RelatedEntity1528 ParentEntity { get; set; } + public RelatedEntity1528 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1530 - { - public int Id { get; set; } + public class RelatedEntity1530 + { + public int Id { get; set; } - public RelatedEntity1529 ParentEntity { get; set; } + public RelatedEntity1529 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1531 - { - public int Id { get; set; } + public class RelatedEntity1531 + { + public int Id { get; set; } - public RelatedEntity1530 ParentEntity { get; set; } + public RelatedEntity1530 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1532 - { - public int Id { get; set; } + public class RelatedEntity1532 + { + public int Id { get; set; } - public RelatedEntity1531 ParentEntity { get; set; } + public RelatedEntity1531 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1533 - { - public int Id { get; set; } + public class RelatedEntity1533 + { + public int Id { get; set; } - public RelatedEntity1532 ParentEntity { get; set; } + public RelatedEntity1532 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1534 - { - public int Id { get; set; } + public class RelatedEntity1534 + { + public int Id { get; set; } - public RelatedEntity1533 ParentEntity { get; set; } + public RelatedEntity1533 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1535 - { - public int Id { get; set; } + public class RelatedEntity1535 + { + public int Id { get; set; } - public RelatedEntity1534 ParentEntity { get; set; } + public RelatedEntity1534 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1536 - { - public int Id { get; set; } + public class RelatedEntity1536 + { + public int Id { get; set; } - public RelatedEntity1535 ParentEntity { get; set; } + public RelatedEntity1535 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1537 - { - public int Id { get; set; } + public class RelatedEntity1537 + { + public int Id { get; set; } - public RelatedEntity1536 ParentEntity { get; set; } + public RelatedEntity1536 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1538 - { - public int Id { get; set; } + public class RelatedEntity1538 + { + public int Id { get; set; } - public RelatedEntity1537 ParentEntity { get; set; } + public RelatedEntity1537 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1539 - { - public int Id { get; set; } + public class RelatedEntity1539 + { + public int Id { get; set; } - public RelatedEntity1538 ParentEntity { get; set; } + public RelatedEntity1538 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1540 - { - public int Id { get; set; } + public class RelatedEntity1540 + { + public int Id { get; set; } - public RelatedEntity1539 ParentEntity { get; set; } + public RelatedEntity1539 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1541 - { - public int Id { get; set; } + public class RelatedEntity1541 + { + public int Id { get; set; } - public RelatedEntity1540 ParentEntity { get; set; } + public RelatedEntity1540 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1542 - { - public int Id { get; set; } + public class RelatedEntity1542 + { + public int Id { get; set; } - public RelatedEntity1541 ParentEntity { get; set; } + public RelatedEntity1541 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1543 - { - public int Id { get; set; } + public class RelatedEntity1543 + { + public int Id { get; set; } - public RelatedEntity1542 ParentEntity { get; set; } + public RelatedEntity1542 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1544 - { - public int Id { get; set; } + public class RelatedEntity1544 + { + public int Id { get; set; } - public RelatedEntity1543 ParentEntity { get; set; } + public RelatedEntity1543 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1545 - { - public int Id { get; set; } + public class RelatedEntity1545 + { + public int Id { get; set; } - public RelatedEntity1544 ParentEntity { get; set; } + public RelatedEntity1544 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1546 - { - public int Id { get; set; } + public class RelatedEntity1546 + { + public int Id { get; set; } - public RelatedEntity1545 ParentEntity { get; set; } + public RelatedEntity1545 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1547 - { - public int Id { get; set; } + public class RelatedEntity1547 + { + public int Id { get; set; } - public RelatedEntity1546 ParentEntity { get; set; } + public RelatedEntity1546 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1548 - { - public int Id { get; set; } + public class RelatedEntity1548 + { + public int Id { get; set; } - public RelatedEntity1547 ParentEntity { get; set; } + public RelatedEntity1547 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1549 - { - public int Id { get; set; } + public class RelatedEntity1549 + { + public int Id { get; set; } - public RelatedEntity1548 ParentEntity { get; set; } + public RelatedEntity1548 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1550 - { - public int Id { get; set; } + public class RelatedEntity1550 + { + public int Id { get; set; } - public RelatedEntity1549 ParentEntity { get; set; } + public RelatedEntity1549 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1551 - { - public int Id { get; set; } + public class RelatedEntity1551 + { + public int Id { get; set; } - public RelatedEntity1550 ParentEntity { get; set; } + public RelatedEntity1550 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1552 - { - public int Id { get; set; } + public class RelatedEntity1552 + { + public int Id { get; set; } - public RelatedEntity1551 ParentEntity { get; set; } + public RelatedEntity1551 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1553 - { - public int Id { get; set; } + public class RelatedEntity1553 + { + public int Id { get; set; } - public RelatedEntity1552 ParentEntity { get; set; } + public RelatedEntity1552 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1554 - { - public int Id { get; set; } + public class RelatedEntity1554 + { + public int Id { get; set; } - public RelatedEntity1553 ParentEntity { get; set; } + public RelatedEntity1553 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1555 - { - public int Id { get; set; } + public class RelatedEntity1555 + { + public int Id { get; set; } - public RelatedEntity1554 ParentEntity { get; set; } + public RelatedEntity1554 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1556 - { - public int Id { get; set; } + public class RelatedEntity1556 + { + public int Id { get; set; } - public RelatedEntity1555 ParentEntity { get; set; } + public RelatedEntity1555 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1557 - { - public int Id { get; set; } + public class RelatedEntity1557 + { + public int Id { get; set; } - public RelatedEntity1556 ParentEntity { get; set; } + public RelatedEntity1556 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1558 - { - public int Id { get; set; } + public class RelatedEntity1558 + { + public int Id { get; set; } - public RelatedEntity1557 ParentEntity { get; set; } + public RelatedEntity1557 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1559 - { - public int Id { get; set; } + public class RelatedEntity1559 + { + public int Id { get; set; } - public RelatedEntity1558 ParentEntity { get; set; } + public RelatedEntity1558 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1560 - { - public int Id { get; set; } + public class RelatedEntity1560 + { + public int Id { get; set; } - public RelatedEntity1559 ParentEntity { get; set; } + public RelatedEntity1559 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1561 - { - public int Id { get; set; } + public class RelatedEntity1561 + { + public int Id { get; set; } - public RelatedEntity1560 ParentEntity { get; set; } + public RelatedEntity1560 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1562 - { - public int Id { get; set; } + public class RelatedEntity1562 + { + public int Id { get; set; } - public RelatedEntity1561 ParentEntity { get; set; } + public RelatedEntity1561 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1563 - { - public int Id { get; set; } + public class RelatedEntity1563 + { + public int Id { get; set; } - public RelatedEntity1562 ParentEntity { get; set; } + public RelatedEntity1562 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1564 - { - public int Id { get; set; } + public class RelatedEntity1564 + { + public int Id { get; set; } - public RelatedEntity1563 ParentEntity { get; set; } + public RelatedEntity1563 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1565 - { - public int Id { get; set; } + public class RelatedEntity1565 + { + public int Id { get; set; } - public RelatedEntity1564 ParentEntity { get; set; } + public RelatedEntity1564 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1566 - { - public int Id { get; set; } + public class RelatedEntity1566 + { + public int Id { get; set; } - public RelatedEntity1565 ParentEntity { get; set; } + public RelatedEntity1565 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1567 - { - public int Id { get; set; } + public class RelatedEntity1567 + { + public int Id { get; set; } - public RelatedEntity1566 ParentEntity { get; set; } + public RelatedEntity1566 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1568 - { - public int Id { get; set; } + public class RelatedEntity1568 + { + public int Id { get; set; } - public RelatedEntity1567 ParentEntity { get; set; } + public RelatedEntity1567 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1569 - { - public int Id { get; set; } + public class RelatedEntity1569 + { + public int Id { get; set; } - public RelatedEntity1568 ParentEntity { get; set; } + public RelatedEntity1568 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1570 - { - public int Id { get; set; } + public class RelatedEntity1570 + { + public int Id { get; set; } - public RelatedEntity1569 ParentEntity { get; set; } + public RelatedEntity1569 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1571 - { - public int Id { get; set; } + public class RelatedEntity1571 + { + public int Id { get; set; } - public RelatedEntity1570 ParentEntity { get; set; } + public RelatedEntity1570 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1572 - { - public int Id { get; set; } + public class RelatedEntity1572 + { + public int Id { get; set; } - public RelatedEntity1571 ParentEntity { get; set; } + public RelatedEntity1571 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1573 - { - public int Id { get; set; } + public class RelatedEntity1573 + { + public int Id { get; set; } - public RelatedEntity1572 ParentEntity { get; set; } + public RelatedEntity1572 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1574 - { - public int Id { get; set; } + public class RelatedEntity1574 + { + public int Id { get; set; } - public RelatedEntity1573 ParentEntity { get; set; } + public RelatedEntity1573 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1575 - { - public int Id { get; set; } + public class RelatedEntity1575 + { + public int Id { get; set; } - public RelatedEntity1574 ParentEntity { get; set; } + public RelatedEntity1574 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1576 - { - public int Id { get; set; } + public class RelatedEntity1576 + { + public int Id { get; set; } - public RelatedEntity1575 ParentEntity { get; set; } + public RelatedEntity1575 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1577 - { - public int Id { get; set; } + public class RelatedEntity1577 + { + public int Id { get; set; } - public RelatedEntity1576 ParentEntity { get; set; } + public RelatedEntity1576 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1578 - { - public int Id { get; set; } + public class RelatedEntity1578 + { + public int Id { get; set; } - public RelatedEntity1577 ParentEntity { get; set; } + public RelatedEntity1577 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1579 - { - public int Id { get; set; } + public class RelatedEntity1579 + { + public int Id { get; set; } - public RelatedEntity1578 ParentEntity { get; set; } + public RelatedEntity1578 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1580 - { - public int Id { get; set; } + public class RelatedEntity1580 + { + public int Id { get; set; } - public RelatedEntity1579 ParentEntity { get; set; } + public RelatedEntity1579 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1581 - { - public int Id { get; set; } + public class RelatedEntity1581 + { + public int Id { get; set; } - public RelatedEntity1580 ParentEntity { get; set; } + public RelatedEntity1580 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1582 - { - public int Id { get; set; } + public class RelatedEntity1582 + { + public int Id { get; set; } - public RelatedEntity1581 ParentEntity { get; set; } + public RelatedEntity1581 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1583 - { - public int Id { get; set; } + public class RelatedEntity1583 + { + public int Id { get; set; } - public RelatedEntity1582 ParentEntity { get; set; } + public RelatedEntity1582 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1584 - { - public int Id { get; set; } + public class RelatedEntity1584 + { + public int Id { get; set; } - public RelatedEntity1583 ParentEntity { get; set; } + public RelatedEntity1583 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1585 - { - public int Id { get; set; } + public class RelatedEntity1585 + { + public int Id { get; set; } - public RelatedEntity1584 ParentEntity { get; set; } + public RelatedEntity1584 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1586 - { - public int Id { get; set; } + public class RelatedEntity1586 + { + public int Id { get; set; } - public RelatedEntity1585 ParentEntity { get; set; } + public RelatedEntity1585 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1587 - { - public int Id { get; set; } + public class RelatedEntity1587 + { + public int Id { get; set; } - public RelatedEntity1586 ParentEntity { get; set; } + public RelatedEntity1586 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1588 - { - public int Id { get; set; } + public class RelatedEntity1588 + { + public int Id { get; set; } - public RelatedEntity1587 ParentEntity { get; set; } + public RelatedEntity1587 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1589 - { - public int Id { get; set; } + public class RelatedEntity1589 + { + public int Id { get; set; } - public RelatedEntity1588 ParentEntity { get; set; } + public RelatedEntity1588 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1590 - { - public int Id { get; set; } + public class RelatedEntity1590 + { + public int Id { get; set; } - public RelatedEntity1589 ParentEntity { get; set; } + public RelatedEntity1589 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1591 - { - public int Id { get; set; } + public class RelatedEntity1591 + { + public int Id { get; set; } - public RelatedEntity1590 ParentEntity { get; set; } + public RelatedEntity1590 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1592 - { - public int Id { get; set; } + public class RelatedEntity1592 + { + public int Id { get; set; } - public RelatedEntity1591 ParentEntity { get; set; } + public RelatedEntity1591 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1593 - { - public int Id { get; set; } + public class RelatedEntity1593 + { + public int Id { get; set; } - public RelatedEntity1592 ParentEntity { get; set; } + public RelatedEntity1592 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1594 - { - public int Id { get; set; } + public class RelatedEntity1594 + { + public int Id { get; set; } - public RelatedEntity1593 ParentEntity { get; set; } + public RelatedEntity1593 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1595 - { - public int Id { get; set; } + public class RelatedEntity1595 + { + public int Id { get; set; } - public RelatedEntity1594 ParentEntity { get; set; } + public RelatedEntity1594 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1596 - { - public int Id { get; set; } + public class RelatedEntity1596 + { + public int Id { get; set; } - public RelatedEntity1595 ParentEntity { get; set; } + public RelatedEntity1595 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1597 - { - public int Id { get; set; } + public class RelatedEntity1597 + { + public int Id { get; set; } - public RelatedEntity1596 ParentEntity { get; set; } + public RelatedEntity1596 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1598 - { - public int Id { get; set; } + public class RelatedEntity1598 + { + public int Id { get; set; } - public RelatedEntity1597 ParentEntity { get; set; } + public RelatedEntity1597 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1599 - { - public int Id { get; set; } + public class RelatedEntity1599 + { + public int Id { get; set; } - public RelatedEntity1598 ParentEntity { get; set; } + public RelatedEntity1598 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1600 - { - public int Id { get; set; } + public class RelatedEntity1600 + { + public int Id { get; set; } - public RelatedEntity1599 ParentEntity { get; set; } + public RelatedEntity1599 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1601 - { - public int Id { get; set; } + public class RelatedEntity1601 + { + public int Id { get; set; } - public RelatedEntity1600 ParentEntity { get; set; } + public RelatedEntity1600 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1602 - { - public int Id { get; set; } + public class RelatedEntity1602 + { + public int Id { get; set; } - public RelatedEntity1601 ParentEntity { get; set; } + public RelatedEntity1601 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1603 - { - public int Id { get; set; } + public class RelatedEntity1603 + { + public int Id { get; set; } - public RelatedEntity1602 ParentEntity { get; set; } + public RelatedEntity1602 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1604 - { - public int Id { get; set; } + public class RelatedEntity1604 + { + public int Id { get; set; } - public RelatedEntity1603 ParentEntity { get; set; } + public RelatedEntity1603 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1605 - { - public int Id { get; set; } + public class RelatedEntity1605 + { + public int Id { get; set; } - public RelatedEntity1604 ParentEntity { get; set; } + public RelatedEntity1604 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1606 - { - public int Id { get; set; } + public class RelatedEntity1606 + { + public int Id { get; set; } - public RelatedEntity1605 ParentEntity { get; set; } + public RelatedEntity1605 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1607 - { - public int Id { get; set; } + public class RelatedEntity1607 + { + public int Id { get; set; } - public RelatedEntity1606 ParentEntity { get; set; } + public RelatedEntity1606 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1608 - { - public int Id { get; set; } + public class RelatedEntity1608 + { + public int Id { get; set; } - public RelatedEntity1607 ParentEntity { get; set; } + public RelatedEntity1607 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1609 - { - public int Id { get; set; } + public class RelatedEntity1609 + { + public int Id { get; set; } - public RelatedEntity1608 ParentEntity { get; set; } + public RelatedEntity1608 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1610 - { - public int Id { get; set; } + public class RelatedEntity1610 + { + public int Id { get; set; } - public RelatedEntity1609 ParentEntity { get; set; } + public RelatedEntity1609 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1611 - { - public int Id { get; set; } + public class RelatedEntity1611 + { + public int Id { get; set; } - public RelatedEntity1610 ParentEntity { get; set; } + public RelatedEntity1610 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1612 - { - public int Id { get; set; } + public class RelatedEntity1612 + { + public int Id { get; set; } - public RelatedEntity1611 ParentEntity { get; set; } + public RelatedEntity1611 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1613 - { - public int Id { get; set; } + public class RelatedEntity1613 + { + public int Id { get; set; } - public RelatedEntity1612 ParentEntity { get; set; } + public RelatedEntity1612 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1614 - { - public int Id { get; set; } + public class RelatedEntity1614 + { + public int Id { get; set; } - public RelatedEntity1613 ParentEntity { get; set; } + public RelatedEntity1613 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1615 - { - public int Id { get; set; } + public class RelatedEntity1615 + { + public int Id { get; set; } - public RelatedEntity1614 ParentEntity { get; set; } + public RelatedEntity1614 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1616 - { - public int Id { get; set; } + public class RelatedEntity1616 + { + public int Id { get; set; } - public RelatedEntity1615 ParentEntity { get; set; } + public RelatedEntity1615 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1617 - { - public int Id { get; set; } + public class RelatedEntity1617 + { + public int Id { get; set; } - public RelatedEntity1616 ParentEntity { get; set; } + public RelatedEntity1616 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1618 - { - public int Id { get; set; } + public class RelatedEntity1618 + { + public int Id { get; set; } - public RelatedEntity1617 ParentEntity { get; set; } + public RelatedEntity1617 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1619 - { - public int Id { get; set; } + public class RelatedEntity1619 + { + public int Id { get; set; } - public RelatedEntity1618 ParentEntity { get; set; } + public RelatedEntity1618 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1620 - { - public int Id { get; set; } + public class RelatedEntity1620 + { + public int Id { get; set; } - public RelatedEntity1619 ParentEntity { get; set; } + public RelatedEntity1619 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1621 - { - public int Id { get; set; } + public class RelatedEntity1621 + { + public int Id { get; set; } - public RelatedEntity1620 ParentEntity { get; set; } + public RelatedEntity1620 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1622 - { - public int Id { get; set; } + public class RelatedEntity1622 + { + public int Id { get; set; } - public RelatedEntity1621 ParentEntity { get; set; } + public RelatedEntity1621 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1623 - { - public int Id { get; set; } + public class RelatedEntity1623 + { + public int Id { get; set; } - public RelatedEntity1622 ParentEntity { get; set; } + public RelatedEntity1622 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1624 - { - public int Id { get; set; } + public class RelatedEntity1624 + { + public int Id { get; set; } - public RelatedEntity1623 ParentEntity { get; set; } + public RelatedEntity1623 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1625 - { - public int Id { get; set; } + public class RelatedEntity1625 + { + public int Id { get; set; } - public RelatedEntity1624 ParentEntity { get; set; } + public RelatedEntity1624 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1626 - { - public int Id { get; set; } + public class RelatedEntity1626 + { + public int Id { get; set; } - public RelatedEntity1625 ParentEntity { get; set; } + public RelatedEntity1625 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1627 - { - public int Id { get; set; } + public class RelatedEntity1627 + { + public int Id { get; set; } - public RelatedEntity1626 ParentEntity { get; set; } + public RelatedEntity1626 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1628 - { - public int Id { get; set; } + public class RelatedEntity1628 + { + public int Id { get; set; } - public RelatedEntity1627 ParentEntity { get; set; } + public RelatedEntity1627 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1629 - { - public int Id { get; set; } + public class RelatedEntity1629 + { + public int Id { get; set; } - public RelatedEntity1628 ParentEntity { get; set; } + public RelatedEntity1628 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1630 - { - public int Id { get; set; } + public class RelatedEntity1630 + { + public int Id { get; set; } - public RelatedEntity1629 ParentEntity { get; set; } + public RelatedEntity1629 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1631 - { - public int Id { get; set; } + public class RelatedEntity1631 + { + public int Id { get; set; } - public RelatedEntity1630 ParentEntity { get; set; } + public RelatedEntity1630 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1632 - { - public int Id { get; set; } + public class RelatedEntity1632 + { + public int Id { get; set; } - public RelatedEntity1631 ParentEntity { get; set; } + public RelatedEntity1631 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1633 - { - public int Id { get; set; } + public class RelatedEntity1633 + { + public int Id { get; set; } - public RelatedEntity1632 ParentEntity { get; set; } + public RelatedEntity1632 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1634 - { - public int Id { get; set; } + public class RelatedEntity1634 + { + public int Id { get; set; } - public RelatedEntity1633 ParentEntity { get; set; } + public RelatedEntity1633 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1635 - { - public int Id { get; set; } + public class RelatedEntity1635 + { + public int Id { get; set; } - public RelatedEntity1634 ParentEntity { get; set; } + public RelatedEntity1634 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1636 - { - public int Id { get; set; } + public class RelatedEntity1636 + { + public int Id { get; set; } - public RelatedEntity1635 ParentEntity { get; set; } + public RelatedEntity1635 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1637 - { - public int Id { get; set; } + public class RelatedEntity1637 + { + public int Id { get; set; } - public RelatedEntity1636 ParentEntity { get; set; } + public RelatedEntity1636 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1638 - { - public int Id { get; set; } + public class RelatedEntity1638 + { + public int Id { get; set; } - public RelatedEntity1637 ParentEntity { get; set; } + public RelatedEntity1637 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1639 - { - public int Id { get; set; } + public class RelatedEntity1639 + { + public int Id { get; set; } - public RelatedEntity1638 ParentEntity { get; set; } + public RelatedEntity1638 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1640 - { - public int Id { get; set; } + public class RelatedEntity1640 + { + public int Id { get; set; } - public RelatedEntity1639 ParentEntity { get; set; } + public RelatedEntity1639 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1641 - { - public int Id { get; set; } + public class RelatedEntity1641 + { + public int Id { get; set; } - public RelatedEntity1640 ParentEntity { get; set; } + public RelatedEntity1640 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1642 - { - public int Id { get; set; } + public class RelatedEntity1642 + { + public int Id { get; set; } - public RelatedEntity1641 ParentEntity { get; set; } + public RelatedEntity1641 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1643 - { - public int Id { get; set; } + public class RelatedEntity1643 + { + public int Id { get; set; } - public RelatedEntity1642 ParentEntity { get; set; } + public RelatedEntity1642 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1644 - { - public int Id { get; set; } + public class RelatedEntity1644 + { + public int Id { get; set; } - public RelatedEntity1643 ParentEntity { get; set; } + public RelatedEntity1643 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1645 - { - public int Id { get; set; } + public class RelatedEntity1645 + { + public int Id { get; set; } - public RelatedEntity1644 ParentEntity { get; set; } + public RelatedEntity1644 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1646 - { - public int Id { get; set; } + public class RelatedEntity1646 + { + public int Id { get; set; } - public RelatedEntity1645 ParentEntity { get; set; } + public RelatedEntity1645 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1647 - { - public int Id { get; set; } + public class RelatedEntity1647 + { + public int Id { get; set; } - public RelatedEntity1646 ParentEntity { get; set; } + public RelatedEntity1646 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1648 - { - public int Id { get; set; } + public class RelatedEntity1648 + { + public int Id { get; set; } - public RelatedEntity1647 ParentEntity { get; set; } + public RelatedEntity1647 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1649 - { - public int Id { get; set; } + public class RelatedEntity1649 + { + public int Id { get; set; } - public RelatedEntity1648 ParentEntity { get; set; } + public RelatedEntity1648 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1650 - { - public int Id { get; set; } + public class RelatedEntity1650 + { + public int Id { get; set; } - public RelatedEntity1649 ParentEntity { get; set; } + public RelatedEntity1649 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1651 - { - public int Id { get; set; } + public class RelatedEntity1651 + { + public int Id { get; set; } - public RelatedEntity1650 ParentEntity { get; set; } + public RelatedEntity1650 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1652 - { - public int Id { get; set; } + public class RelatedEntity1652 + { + public int Id { get; set; } - public RelatedEntity1651 ParentEntity { get; set; } + public RelatedEntity1651 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1653 - { - public int Id { get; set; } + public class RelatedEntity1653 + { + public int Id { get; set; } - public RelatedEntity1652 ParentEntity { get; set; } + public RelatedEntity1652 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1654 - { - public int Id { get; set; } + public class RelatedEntity1654 + { + public int Id { get; set; } - public RelatedEntity1653 ParentEntity { get; set; } + public RelatedEntity1653 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1655 - { - public int Id { get; set; } + public class RelatedEntity1655 + { + public int Id { get; set; } - public RelatedEntity1654 ParentEntity { get; set; } + public RelatedEntity1654 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1656 - { - public int Id { get; set; } + public class RelatedEntity1656 + { + public int Id { get; set; } - public RelatedEntity1655 ParentEntity { get; set; } + public RelatedEntity1655 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1657 - { - public int Id { get; set; } + public class RelatedEntity1657 + { + public int Id { get; set; } - public RelatedEntity1656 ParentEntity { get; set; } + public RelatedEntity1656 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1658 - { - public int Id { get; set; } + public class RelatedEntity1658 + { + public int Id { get; set; } - public RelatedEntity1657 ParentEntity { get; set; } + public RelatedEntity1657 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1659 - { - public int Id { get; set; } + public class RelatedEntity1659 + { + public int Id { get; set; } - public RelatedEntity1658 ParentEntity { get; set; } + public RelatedEntity1658 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1660 - { - public int Id { get; set; } + public class RelatedEntity1660 + { + public int Id { get; set; } - public RelatedEntity1659 ParentEntity { get; set; } + public RelatedEntity1659 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1661 - { - public int Id { get; set; } + public class RelatedEntity1661 + { + public int Id { get; set; } - public RelatedEntity1660 ParentEntity { get; set; } + public RelatedEntity1660 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1662 - { - public int Id { get; set; } + public class RelatedEntity1662 + { + public int Id { get; set; } - public RelatedEntity1661 ParentEntity { get; set; } + public RelatedEntity1661 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1663 - { - public int Id { get; set; } + public class RelatedEntity1663 + { + public int Id { get; set; } - public RelatedEntity1662 ParentEntity { get; set; } + public RelatedEntity1662 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1664 - { - public int Id { get; set; } + public class RelatedEntity1664 + { + public int Id { get; set; } - public RelatedEntity1663 ParentEntity { get; set; } + public RelatedEntity1663 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1665 - { - public int Id { get; set; } + public class RelatedEntity1665 + { + public int Id { get; set; } - public RelatedEntity1664 ParentEntity { get; set; } + public RelatedEntity1664 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1666 - { - public int Id { get; set; } + public class RelatedEntity1666 + { + public int Id { get; set; } - public RelatedEntity1665 ParentEntity { get; set; } + public RelatedEntity1665 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1667 - { - public int Id { get; set; } + public class RelatedEntity1667 + { + public int Id { get; set; } - public RelatedEntity1666 ParentEntity { get; set; } + public RelatedEntity1666 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1668 - { - public int Id { get; set; } + public class RelatedEntity1668 + { + public int Id { get; set; } - public RelatedEntity1667 ParentEntity { get; set; } + public RelatedEntity1667 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1669 - { - public int Id { get; set; } + public class RelatedEntity1669 + { + public int Id { get; set; } - public RelatedEntity1668 ParentEntity { get; set; } + public RelatedEntity1668 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1670 - { - public int Id { get; set; } + public class RelatedEntity1670 + { + public int Id { get; set; } - public RelatedEntity1669 ParentEntity { get; set; } + public RelatedEntity1669 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1671 - { - public int Id { get; set; } + public class RelatedEntity1671 + { + public int Id { get; set; } - public RelatedEntity1670 ParentEntity { get; set; } + public RelatedEntity1670 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1672 - { - public int Id { get; set; } + public class RelatedEntity1672 + { + public int Id { get; set; } - public RelatedEntity1671 ParentEntity { get; set; } + public RelatedEntity1671 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1673 - { - public int Id { get; set; } + public class RelatedEntity1673 + { + public int Id { get; set; } - public RelatedEntity1672 ParentEntity { get; set; } + public RelatedEntity1672 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1674 - { - public int Id { get; set; } + public class RelatedEntity1674 + { + public int Id { get; set; } - public RelatedEntity1673 ParentEntity { get; set; } + public RelatedEntity1673 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1675 - { - public int Id { get; set; } + public class RelatedEntity1675 + { + public int Id { get; set; } - public RelatedEntity1674 ParentEntity { get; set; } + public RelatedEntity1674 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1676 - { - public int Id { get; set; } + public class RelatedEntity1676 + { + public int Id { get; set; } - public RelatedEntity1675 ParentEntity { get; set; } + public RelatedEntity1675 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1677 - { - public int Id { get; set; } + public class RelatedEntity1677 + { + public int Id { get; set; } - public RelatedEntity1676 ParentEntity { get; set; } + public RelatedEntity1676 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1678 - { - public int Id { get; set; } + public class RelatedEntity1678 + { + public int Id { get; set; } - public RelatedEntity1677 ParentEntity { get; set; } + public RelatedEntity1677 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1679 - { - public int Id { get; set; } + public class RelatedEntity1679 + { + public int Id { get; set; } - public RelatedEntity1678 ParentEntity { get; set; } + public RelatedEntity1678 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1680 - { - public int Id { get; set; } + public class RelatedEntity1680 + { + public int Id { get; set; } - public RelatedEntity1679 ParentEntity { get; set; } + public RelatedEntity1679 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1681 - { - public int Id { get; set; } + public class RelatedEntity1681 + { + public int Id { get; set; } - public RelatedEntity1680 ParentEntity { get; set; } + public RelatedEntity1680 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1682 - { - public int Id { get; set; } + public class RelatedEntity1682 + { + public int Id { get; set; } - public RelatedEntity1681 ParentEntity { get; set; } + public RelatedEntity1681 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1683 - { - public int Id { get; set; } + public class RelatedEntity1683 + { + public int Id { get; set; } - public RelatedEntity1682 ParentEntity { get; set; } + public RelatedEntity1682 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1684 - { - public int Id { get; set; } + public class RelatedEntity1684 + { + public int Id { get; set; } - public RelatedEntity1683 ParentEntity { get; set; } + public RelatedEntity1683 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1685 - { - public int Id { get; set; } + public class RelatedEntity1685 + { + public int Id { get; set; } - public RelatedEntity1684 ParentEntity { get; set; } + public RelatedEntity1684 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1686 - { - public int Id { get; set; } + public class RelatedEntity1686 + { + public int Id { get; set; } - public RelatedEntity1685 ParentEntity { get; set; } + public RelatedEntity1685 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1687 - { - public int Id { get; set; } + public class RelatedEntity1687 + { + public int Id { get; set; } - public RelatedEntity1686 ParentEntity { get; set; } + public RelatedEntity1686 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1688 - { - public int Id { get; set; } + public class RelatedEntity1688 + { + public int Id { get; set; } - public RelatedEntity1687 ParentEntity { get; set; } + public RelatedEntity1687 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1689 - { - public int Id { get; set; } + public class RelatedEntity1689 + { + public int Id { get; set; } - public RelatedEntity1688 ParentEntity { get; set; } + public RelatedEntity1688 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1690 - { - public int Id { get; set; } + public class RelatedEntity1690 + { + public int Id { get; set; } - public RelatedEntity1689 ParentEntity { get; set; } + public RelatedEntity1689 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1691 - { - public int Id { get; set; } + public class RelatedEntity1691 + { + public int Id { get; set; } - public RelatedEntity1690 ParentEntity { get; set; } + public RelatedEntity1690 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1692 - { - public int Id { get; set; } + public class RelatedEntity1692 + { + public int Id { get; set; } - public RelatedEntity1691 ParentEntity { get; set; } + public RelatedEntity1691 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1693 - { - public int Id { get; set; } + public class RelatedEntity1693 + { + public int Id { get; set; } - public RelatedEntity1692 ParentEntity { get; set; } + public RelatedEntity1692 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1694 - { - public int Id { get; set; } + public class RelatedEntity1694 + { + public int Id { get; set; } - public RelatedEntity1693 ParentEntity { get; set; } + public RelatedEntity1693 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1695 - { - public int Id { get; set; } + public class RelatedEntity1695 + { + public int Id { get; set; } - public RelatedEntity1694 ParentEntity { get; set; } + public RelatedEntity1694 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1696 - { - public int Id { get; set; } + public class RelatedEntity1696 + { + public int Id { get; set; } - public RelatedEntity1695 ParentEntity { get; set; } + public RelatedEntity1695 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1697 - { - public int Id { get; set; } + public class RelatedEntity1697 + { + public int Id { get; set; } - public RelatedEntity1696 ParentEntity { get; set; } + public RelatedEntity1696 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1698 - { - public int Id { get; set; } + public class RelatedEntity1698 + { + public int Id { get; set; } - public RelatedEntity1697 ParentEntity { get; set; } + public RelatedEntity1697 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1699 - { - public int Id { get; set; } + public class RelatedEntity1699 + { + public int Id { get; set; } - public RelatedEntity1698 ParentEntity { get; set; } + public RelatedEntity1698 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1700 - { - public int Id { get; set; } + public class RelatedEntity1700 + { + public int Id { get; set; } - public RelatedEntity1699 ParentEntity { get; set; } + public RelatedEntity1699 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1701 - { - public int Id { get; set; } + public class RelatedEntity1701 + { + public int Id { get; set; } - public RelatedEntity1700 ParentEntity { get; set; } + public RelatedEntity1700 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1702 - { - public int Id { get; set; } + public class RelatedEntity1702 + { + public int Id { get; set; } - public RelatedEntity1701 ParentEntity { get; set; } + public RelatedEntity1701 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1703 - { - public int Id { get; set; } + public class RelatedEntity1703 + { + public int Id { get; set; } - public RelatedEntity1702 ParentEntity { get; set; } + public RelatedEntity1702 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1704 - { - public int Id { get; set; } + public class RelatedEntity1704 + { + public int Id { get; set; } - public RelatedEntity1703 ParentEntity { get; set; } + public RelatedEntity1703 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1705 - { - public int Id { get; set; } + public class RelatedEntity1705 + { + public int Id { get; set; } - public RelatedEntity1704 ParentEntity { get; set; } + public RelatedEntity1704 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1706 - { - public int Id { get; set; } + public class RelatedEntity1706 + { + public int Id { get; set; } - public RelatedEntity1705 ParentEntity { get; set; } + public RelatedEntity1705 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1707 - { - public int Id { get; set; } + public class RelatedEntity1707 + { + public int Id { get; set; } - public RelatedEntity1706 ParentEntity { get; set; } + public RelatedEntity1706 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1708 - { - public int Id { get; set; } + public class RelatedEntity1708 + { + public int Id { get; set; } - public RelatedEntity1707 ParentEntity { get; set; } + public RelatedEntity1707 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1709 - { - public int Id { get; set; } + public class RelatedEntity1709 + { + public int Id { get; set; } - public RelatedEntity1708 ParentEntity { get; set; } + public RelatedEntity1708 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1710 - { - public int Id { get; set; } + public class RelatedEntity1710 + { + public int Id { get; set; } - public RelatedEntity1709 ParentEntity { get; set; } + public RelatedEntity1709 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1711 - { - public int Id { get; set; } + public class RelatedEntity1711 + { + public int Id { get; set; } - public RelatedEntity1710 ParentEntity { get; set; } + public RelatedEntity1710 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1712 - { - public int Id { get; set; } + public class RelatedEntity1712 + { + public int Id { get; set; } - public RelatedEntity1711 ParentEntity { get; set; } + public RelatedEntity1711 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1713 - { - public int Id { get; set; } + public class RelatedEntity1713 + { + public int Id { get; set; } - public RelatedEntity1712 ParentEntity { get; set; } + public RelatedEntity1712 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1714 - { - public int Id { get; set; } + public class RelatedEntity1714 + { + public int Id { get; set; } - public RelatedEntity1713 ParentEntity { get; set; } + public RelatedEntity1713 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1715 - { - public int Id { get; set; } + public class RelatedEntity1715 + { + public int Id { get; set; } - public RelatedEntity1714 ParentEntity { get; set; } + public RelatedEntity1714 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1716 - { - public int Id { get; set; } + public class RelatedEntity1716 + { + public int Id { get; set; } - public RelatedEntity1715 ParentEntity { get; set; } + public RelatedEntity1715 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1717 - { - public int Id { get; set; } + public class RelatedEntity1717 + { + public int Id { get; set; } - public RelatedEntity1716 ParentEntity { get; set; } + public RelatedEntity1716 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1718 - { - public int Id { get; set; } + public class RelatedEntity1718 + { + public int Id { get; set; } - public RelatedEntity1717 ParentEntity { get; set; } + public RelatedEntity1717 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1719 - { - public int Id { get; set; } + public class RelatedEntity1719 + { + public int Id { get; set; } - public RelatedEntity1718 ParentEntity { get; set; } + public RelatedEntity1718 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1720 - { - public int Id { get; set; } + public class RelatedEntity1720 + { + public int Id { get; set; } - public RelatedEntity1719 ParentEntity { get; set; } + public RelatedEntity1719 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1721 - { - public int Id { get; set; } + public class RelatedEntity1721 + { + public int Id { get; set; } - public RelatedEntity1720 ParentEntity { get; set; } + public RelatedEntity1720 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1722 - { - public int Id { get; set; } + public class RelatedEntity1722 + { + public int Id { get; set; } - public RelatedEntity1721 ParentEntity { get; set; } + public RelatedEntity1721 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1723 - { - public int Id { get; set; } + public class RelatedEntity1723 + { + public int Id { get; set; } - public RelatedEntity1722 ParentEntity { get; set; } + public RelatedEntity1722 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1724 - { - public int Id { get; set; } + public class RelatedEntity1724 + { + public int Id { get; set; } - public RelatedEntity1723 ParentEntity { get; set; } + public RelatedEntity1723 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1725 - { - public int Id { get; set; } + public class RelatedEntity1725 + { + public int Id { get; set; } - public RelatedEntity1724 ParentEntity { get; set; } + public RelatedEntity1724 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1726 - { - public int Id { get; set; } + public class RelatedEntity1726 + { + public int Id { get; set; } - public RelatedEntity1725 ParentEntity { get; set; } + public RelatedEntity1725 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1727 - { - public int Id { get; set; } + public class RelatedEntity1727 + { + public int Id { get; set; } - public RelatedEntity1726 ParentEntity { get; set; } + public RelatedEntity1726 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1728 - { - public int Id { get; set; } + public class RelatedEntity1728 + { + public int Id { get; set; } - public RelatedEntity1727 ParentEntity { get; set; } + public RelatedEntity1727 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1729 - { - public int Id { get; set; } + public class RelatedEntity1729 + { + public int Id { get; set; } - public RelatedEntity1728 ParentEntity { get; set; } + public RelatedEntity1728 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1730 - { - public int Id { get; set; } + public class RelatedEntity1730 + { + public int Id { get; set; } - public RelatedEntity1729 ParentEntity { get; set; } + public RelatedEntity1729 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1731 - { - public int Id { get; set; } + public class RelatedEntity1731 + { + public int Id { get; set; } - public RelatedEntity1730 ParentEntity { get; set; } + public RelatedEntity1730 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1732 - { - public int Id { get; set; } + public class RelatedEntity1732 + { + public int Id { get; set; } - public RelatedEntity1731 ParentEntity { get; set; } + public RelatedEntity1731 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1733 - { - public int Id { get; set; } + public class RelatedEntity1733 + { + public int Id { get; set; } - public RelatedEntity1732 ParentEntity { get; set; } + public RelatedEntity1732 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1734 - { - public int Id { get; set; } + public class RelatedEntity1734 + { + public int Id { get; set; } - public RelatedEntity1733 ParentEntity { get; set; } + public RelatedEntity1733 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1735 - { - public int Id { get; set; } + public class RelatedEntity1735 + { + public int Id { get; set; } - public RelatedEntity1734 ParentEntity { get; set; } + public RelatedEntity1734 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1736 - { - public int Id { get; set; } + public class RelatedEntity1736 + { + public int Id { get; set; } - public RelatedEntity1735 ParentEntity { get; set; } + public RelatedEntity1735 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1737 - { - public int Id { get; set; } + public class RelatedEntity1737 + { + public int Id { get; set; } - public RelatedEntity1736 ParentEntity { get; set; } + public RelatedEntity1736 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1738 - { - public int Id { get; set; } + public class RelatedEntity1738 + { + public int Id { get; set; } - public RelatedEntity1737 ParentEntity { get; set; } + public RelatedEntity1737 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1739 - { - public int Id { get; set; } + public class RelatedEntity1739 + { + public int Id { get; set; } - public RelatedEntity1738 ParentEntity { get; set; } + public RelatedEntity1738 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1740 - { - public int Id { get; set; } + public class RelatedEntity1740 + { + public int Id { get; set; } - public RelatedEntity1739 ParentEntity { get; set; } + public RelatedEntity1739 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1741 - { - public int Id { get; set; } + public class RelatedEntity1741 + { + public int Id { get; set; } - public RelatedEntity1740 ParentEntity { get; set; } + public RelatedEntity1740 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1742 - { - public int Id { get; set; } + public class RelatedEntity1742 + { + public int Id { get; set; } - public RelatedEntity1741 ParentEntity { get; set; } + public RelatedEntity1741 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1743 - { - public int Id { get; set; } + public class RelatedEntity1743 + { + public int Id { get; set; } - public RelatedEntity1742 ParentEntity { get; set; } + public RelatedEntity1742 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1744 - { - public int Id { get; set; } + public class RelatedEntity1744 + { + public int Id { get; set; } - public RelatedEntity1743 ParentEntity { get; set; } + public RelatedEntity1743 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1745 - { - public int Id { get; set; } + public class RelatedEntity1745 + { + public int Id { get; set; } - public RelatedEntity1744 ParentEntity { get; set; } + public RelatedEntity1744 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1746 - { - public int Id { get; set; } + public class RelatedEntity1746 + { + public int Id { get; set; } - public RelatedEntity1745 ParentEntity { get; set; } + public RelatedEntity1745 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1747 - { - public int Id { get; set; } + public class RelatedEntity1747 + { + public int Id { get; set; } - public RelatedEntity1746 ParentEntity { get; set; } + public RelatedEntity1746 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1748 - { - public int Id { get; set; } + public class RelatedEntity1748 + { + public int Id { get; set; } - public RelatedEntity1747 ParentEntity { get; set; } + public RelatedEntity1747 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1749 - { - public int Id { get; set; } + public class RelatedEntity1749 + { + public int Id { get; set; } - public RelatedEntity1748 ParentEntity { get; set; } + public RelatedEntity1748 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1750 - { - public int Id { get; set; } + public class RelatedEntity1750 + { + public int Id { get; set; } - public RelatedEntity1749 ParentEntity { get; set; } + public RelatedEntity1749 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1751 - { - public int Id { get; set; } + public class RelatedEntity1751 + { + public int Id { get; set; } - public RelatedEntity1750 ParentEntity { get; set; } + public RelatedEntity1750 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1752 - { - public int Id { get; set; } + public class RelatedEntity1752 + { + public int Id { get; set; } - public RelatedEntity1751 ParentEntity { get; set; } + public RelatedEntity1751 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1753 - { - public int Id { get; set; } + public class RelatedEntity1753 + { + public int Id { get; set; } - public RelatedEntity1752 ParentEntity { get; set; } + public RelatedEntity1752 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1754 - { - public int Id { get; set; } + public class RelatedEntity1754 + { + public int Id { get; set; } - public RelatedEntity1753 ParentEntity { get; set; } + public RelatedEntity1753 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1755 - { - public int Id { get; set; } + public class RelatedEntity1755 + { + public int Id { get; set; } - public RelatedEntity1754 ParentEntity { get; set; } + public RelatedEntity1754 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1756 - { - public int Id { get; set; } + public class RelatedEntity1756 + { + public int Id { get; set; } - public RelatedEntity1755 ParentEntity { get; set; } + public RelatedEntity1755 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1757 - { - public int Id { get; set; } + public class RelatedEntity1757 + { + public int Id { get; set; } - public RelatedEntity1756 ParentEntity { get; set; } + public RelatedEntity1756 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1758 - { - public int Id { get; set; } + public class RelatedEntity1758 + { + public int Id { get; set; } - public RelatedEntity1757 ParentEntity { get; set; } + public RelatedEntity1757 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1759 - { - public int Id { get; set; } + public class RelatedEntity1759 + { + public int Id { get; set; } - public RelatedEntity1758 ParentEntity { get; set; } + public RelatedEntity1758 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1760 - { - public int Id { get; set; } + public class RelatedEntity1760 + { + public int Id { get; set; } - public RelatedEntity1759 ParentEntity { get; set; } + public RelatedEntity1759 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1761 - { - public int Id { get; set; } + public class RelatedEntity1761 + { + public int Id { get; set; } - public RelatedEntity1760 ParentEntity { get; set; } + public RelatedEntity1760 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1762 - { - public int Id { get; set; } + public class RelatedEntity1762 + { + public int Id { get; set; } - public RelatedEntity1761 ParentEntity { get; set; } + public RelatedEntity1761 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1763 - { - public int Id { get; set; } + public class RelatedEntity1763 + { + public int Id { get; set; } - public RelatedEntity1762 ParentEntity { get; set; } + public RelatedEntity1762 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1764 - { - public int Id { get; set; } + public class RelatedEntity1764 + { + public int Id { get; set; } - public RelatedEntity1763 ParentEntity { get; set; } + public RelatedEntity1763 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1765 - { - public int Id { get; set; } + public class RelatedEntity1765 + { + public int Id { get; set; } - public RelatedEntity1764 ParentEntity { get; set; } + public RelatedEntity1764 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1766 - { - public int Id { get; set; } + public class RelatedEntity1766 + { + public int Id { get; set; } - public RelatedEntity1765 ParentEntity { get; set; } + public RelatedEntity1765 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1767 - { - public int Id { get; set; } + public class RelatedEntity1767 + { + public int Id { get; set; } - public RelatedEntity1766 ParentEntity { get; set; } + public RelatedEntity1766 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1768 - { - public int Id { get; set; } + public class RelatedEntity1768 + { + public int Id { get; set; } - public RelatedEntity1767 ParentEntity { get; set; } + public RelatedEntity1767 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1769 - { - public int Id { get; set; } + public class RelatedEntity1769 + { + public int Id { get; set; } - public RelatedEntity1768 ParentEntity { get; set; } + public RelatedEntity1768 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1770 - { - public int Id { get; set; } + public class RelatedEntity1770 + { + public int Id { get; set; } - public RelatedEntity1769 ParentEntity { get; set; } + public RelatedEntity1769 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1771 - { - public int Id { get; set; } + public class RelatedEntity1771 + { + public int Id { get; set; } - public RelatedEntity1770 ParentEntity { get; set; } + public RelatedEntity1770 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1772 - { - public int Id { get; set; } + public class RelatedEntity1772 + { + public int Id { get; set; } - public RelatedEntity1771 ParentEntity { get; set; } + public RelatedEntity1771 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1773 - { - public int Id { get; set; } + public class RelatedEntity1773 + { + public int Id { get; set; } - public RelatedEntity1772 ParentEntity { get; set; } + public RelatedEntity1772 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1774 - { - public int Id { get; set; } + public class RelatedEntity1774 + { + public int Id { get; set; } - public RelatedEntity1773 ParentEntity { get; set; } + public RelatedEntity1773 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1775 - { - public int Id { get; set; } + public class RelatedEntity1775 + { + public int Id { get; set; } - public RelatedEntity1774 ParentEntity { get; set; } + public RelatedEntity1774 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1776 - { - public int Id { get; set; } + public class RelatedEntity1776 + { + public int Id { get; set; } - public RelatedEntity1775 ParentEntity { get; set; } + public RelatedEntity1775 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1777 - { - public int Id { get; set; } + public class RelatedEntity1777 + { + public int Id { get; set; } - public RelatedEntity1776 ParentEntity { get; set; } + public RelatedEntity1776 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1778 - { - public int Id { get; set; } + public class RelatedEntity1778 + { + public int Id { get; set; } - public RelatedEntity1777 ParentEntity { get; set; } + public RelatedEntity1777 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1779 - { - public int Id { get; set; } + public class RelatedEntity1779 + { + public int Id { get; set; } - public RelatedEntity1778 ParentEntity { get; set; } + public RelatedEntity1778 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1780 - { - public int Id { get; set; } + public class RelatedEntity1780 + { + public int Id { get; set; } - public RelatedEntity1779 ParentEntity { get; set; } + public RelatedEntity1779 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1781 - { - public int Id { get; set; } + public class RelatedEntity1781 + { + public int Id { get; set; } - public RelatedEntity1780 ParentEntity { get; set; } + public RelatedEntity1780 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1782 - { - public int Id { get; set; } + public class RelatedEntity1782 + { + public int Id { get; set; } - public RelatedEntity1781 ParentEntity { get; set; } + public RelatedEntity1781 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1783 - { - public int Id { get; set; } + public class RelatedEntity1783 + { + public int Id { get; set; } - public RelatedEntity1782 ParentEntity { get; set; } + public RelatedEntity1782 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1784 - { - public int Id { get; set; } + public class RelatedEntity1784 + { + public int Id { get; set; } - public RelatedEntity1783 ParentEntity { get; set; } + public RelatedEntity1783 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1785 - { - public int Id { get; set; } + public class RelatedEntity1785 + { + public int Id { get; set; } - public RelatedEntity1784 ParentEntity { get; set; } + public RelatedEntity1784 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1786 - { - public int Id { get; set; } + public class RelatedEntity1786 + { + public int Id { get; set; } - public RelatedEntity1785 ParentEntity { get; set; } + public RelatedEntity1785 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1787 - { - public int Id { get; set; } + public class RelatedEntity1787 + { + public int Id { get; set; } - public RelatedEntity1786 ParentEntity { get; set; } + public RelatedEntity1786 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1788 - { - public int Id { get; set; } + public class RelatedEntity1788 + { + public int Id { get; set; } - public RelatedEntity1787 ParentEntity { get; set; } + public RelatedEntity1787 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1789 - { - public int Id { get; set; } + public class RelatedEntity1789 + { + public int Id { get; set; } - public RelatedEntity1788 ParentEntity { get; set; } + public RelatedEntity1788 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1790 - { - public int Id { get; set; } + public class RelatedEntity1790 + { + public int Id { get; set; } - public RelatedEntity1789 ParentEntity { get; set; } + public RelatedEntity1789 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1791 - { - public int Id { get; set; } + public class RelatedEntity1791 + { + public int Id { get; set; } - public RelatedEntity1790 ParentEntity { get; set; } + public RelatedEntity1790 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1792 - { - public int Id { get; set; } + public class RelatedEntity1792 + { + public int Id { get; set; } - public RelatedEntity1791 ParentEntity { get; set; } + public RelatedEntity1791 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1793 - { - public int Id { get; set; } + public class RelatedEntity1793 + { + public int Id { get; set; } - public RelatedEntity1792 ParentEntity { get; set; } + public RelatedEntity1792 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1794 - { - public int Id { get; set; } + public class RelatedEntity1794 + { + public int Id { get; set; } - public RelatedEntity1793 ParentEntity { get; set; } + public RelatedEntity1793 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1795 - { - public int Id { get; set; } + public class RelatedEntity1795 + { + public int Id { get; set; } - public RelatedEntity1794 ParentEntity { get; set; } + public RelatedEntity1794 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1796 - { - public int Id { get; set; } + public class RelatedEntity1796 + { + public int Id { get; set; } - public RelatedEntity1795 ParentEntity { get; set; } + public RelatedEntity1795 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1797 - { - public int Id { get; set; } + public class RelatedEntity1797 + { + public int Id { get; set; } - public RelatedEntity1796 ParentEntity { get; set; } + public RelatedEntity1796 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1798 - { - public int Id { get; set; } + public class RelatedEntity1798 + { + public int Id { get; set; } - public RelatedEntity1797 ParentEntity { get; set; } + public RelatedEntity1797 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1799 - { - public int Id { get; set; } + public class RelatedEntity1799 + { + public int Id { get; set; } - public RelatedEntity1798 ParentEntity { get; set; } + public RelatedEntity1798 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1800 - { - public int Id { get; set; } + public class RelatedEntity1800 + { + public int Id { get; set; } - public RelatedEntity1799 ParentEntity { get; set; } + public RelatedEntity1799 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1801 - { - public int Id { get; set; } + public class RelatedEntity1801 + { + public int Id { get; set; } - public RelatedEntity1800 ParentEntity { get; set; } + public RelatedEntity1800 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1802 - { - public int Id { get; set; } + public class RelatedEntity1802 + { + public int Id { get; set; } - public RelatedEntity1801 ParentEntity { get; set; } + public RelatedEntity1801 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1803 - { - public int Id { get; set; } + public class RelatedEntity1803 + { + public int Id { get; set; } - public RelatedEntity1802 ParentEntity { get; set; } + public RelatedEntity1802 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1804 - { - public int Id { get; set; } + public class RelatedEntity1804 + { + public int Id { get; set; } - public RelatedEntity1803 ParentEntity { get; set; } + public RelatedEntity1803 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1805 - { - public int Id { get; set; } + public class RelatedEntity1805 + { + public int Id { get; set; } - public RelatedEntity1804 ParentEntity { get; set; } + public RelatedEntity1804 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1806 - { - public int Id { get; set; } + public class RelatedEntity1806 + { + public int Id { get; set; } - public RelatedEntity1805 ParentEntity { get; set; } + public RelatedEntity1805 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1807 - { - public int Id { get; set; } + public class RelatedEntity1807 + { + public int Id { get; set; } - public RelatedEntity1806 ParentEntity { get; set; } + public RelatedEntity1806 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1808 - { - public int Id { get; set; } + public class RelatedEntity1808 + { + public int Id { get; set; } - public RelatedEntity1807 ParentEntity { get; set; } + public RelatedEntity1807 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1809 - { - public int Id { get; set; } + public class RelatedEntity1809 + { + public int Id { get; set; } - public RelatedEntity1808 ParentEntity { get; set; } + public RelatedEntity1808 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1810 - { - public int Id { get; set; } + public class RelatedEntity1810 + { + public int Id { get; set; } - public RelatedEntity1809 ParentEntity { get; set; } + public RelatedEntity1809 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1811 - { - public int Id { get; set; } + public class RelatedEntity1811 + { + public int Id { get; set; } - public RelatedEntity1810 ParentEntity { get; set; } + public RelatedEntity1810 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1812 - { - public int Id { get; set; } + public class RelatedEntity1812 + { + public int Id { get; set; } - public RelatedEntity1811 ParentEntity { get; set; } + public RelatedEntity1811 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1813 - { - public int Id { get; set; } + public class RelatedEntity1813 + { + public int Id { get; set; } - public RelatedEntity1812 ParentEntity { get; set; } + public RelatedEntity1812 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1814 - { - public int Id { get; set; } + public class RelatedEntity1814 + { + public int Id { get; set; } - public RelatedEntity1813 ParentEntity { get; set; } + public RelatedEntity1813 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1815 - { - public int Id { get; set; } + public class RelatedEntity1815 + { + public int Id { get; set; } - public RelatedEntity1814 ParentEntity { get; set; } + public RelatedEntity1814 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1816 - { - public int Id { get; set; } + public class RelatedEntity1816 + { + public int Id { get; set; } - public RelatedEntity1815 ParentEntity { get; set; } + public RelatedEntity1815 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1817 - { - public int Id { get; set; } + public class RelatedEntity1817 + { + public int Id { get; set; } - public RelatedEntity1816 ParentEntity { get; set; } + public RelatedEntity1816 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1818 - { - public int Id { get; set; } + public class RelatedEntity1818 + { + public int Id { get; set; } - public RelatedEntity1817 ParentEntity { get; set; } + public RelatedEntity1817 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1819 - { - public int Id { get; set; } + public class RelatedEntity1819 + { + public int Id { get; set; } - public RelatedEntity1818 ParentEntity { get; set; } + public RelatedEntity1818 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1820 - { - public int Id { get; set; } + public class RelatedEntity1820 + { + public int Id { get; set; } - public RelatedEntity1819 ParentEntity { get; set; } + public RelatedEntity1819 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1821 - { - public int Id { get; set; } + public class RelatedEntity1821 + { + public int Id { get; set; } - public RelatedEntity1820 ParentEntity { get; set; } + public RelatedEntity1820 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1822 - { - public int Id { get; set; } + public class RelatedEntity1822 + { + public int Id { get; set; } - public RelatedEntity1821 ParentEntity { get; set; } + public RelatedEntity1821 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1823 - { - public int Id { get; set; } + public class RelatedEntity1823 + { + public int Id { get; set; } - public RelatedEntity1822 ParentEntity { get; set; } + public RelatedEntity1822 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1824 - { - public int Id { get; set; } + public class RelatedEntity1824 + { + public int Id { get; set; } - public RelatedEntity1823 ParentEntity { get; set; } + public RelatedEntity1823 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1825 - { - public int Id { get; set; } + public class RelatedEntity1825 + { + public int Id { get; set; } - public RelatedEntity1824 ParentEntity { get; set; } + public RelatedEntity1824 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1826 - { - public int Id { get; set; } + public class RelatedEntity1826 + { + public int Id { get; set; } - public RelatedEntity1825 ParentEntity { get; set; } + public RelatedEntity1825 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1827 - { - public int Id { get; set; } + public class RelatedEntity1827 + { + public int Id { get; set; } - public RelatedEntity1826 ParentEntity { get; set; } + public RelatedEntity1826 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1828 - { - public int Id { get; set; } + public class RelatedEntity1828 + { + public int Id { get; set; } - public RelatedEntity1827 ParentEntity { get; set; } + public RelatedEntity1827 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1829 - { - public int Id { get; set; } + public class RelatedEntity1829 + { + public int Id { get; set; } - public RelatedEntity1828 ParentEntity { get; set; } + public RelatedEntity1828 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1830 - { - public int Id { get; set; } + public class RelatedEntity1830 + { + public int Id { get; set; } - public RelatedEntity1829 ParentEntity { get; set; } + public RelatedEntity1829 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1831 - { - public int Id { get; set; } + public class RelatedEntity1831 + { + public int Id { get; set; } - public RelatedEntity1830 ParentEntity { get; set; } + public RelatedEntity1830 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1832 - { - public int Id { get; set; } + public class RelatedEntity1832 + { + public int Id { get; set; } - public RelatedEntity1831 ParentEntity { get; set; } + public RelatedEntity1831 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1833 - { - public int Id { get; set; } + public class RelatedEntity1833 + { + public int Id { get; set; } - public RelatedEntity1832 ParentEntity { get; set; } + public RelatedEntity1832 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1834 - { - public int Id { get; set; } + public class RelatedEntity1834 + { + public int Id { get; set; } - public RelatedEntity1833 ParentEntity { get; set; } + public RelatedEntity1833 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1835 - { - public int Id { get; set; } + public class RelatedEntity1835 + { + public int Id { get; set; } - public RelatedEntity1834 ParentEntity { get; set; } + public RelatedEntity1834 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1836 - { - public int Id { get; set; } + public class RelatedEntity1836 + { + public int Id { get; set; } - public RelatedEntity1835 ParentEntity { get; set; } + public RelatedEntity1835 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1837 - { - public int Id { get; set; } + public class RelatedEntity1837 + { + public int Id { get; set; } - public RelatedEntity1836 ParentEntity { get; set; } + public RelatedEntity1836 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1838 - { - public int Id { get; set; } + public class RelatedEntity1838 + { + public int Id { get; set; } - public RelatedEntity1837 ParentEntity { get; set; } + public RelatedEntity1837 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1839 - { - public int Id { get; set; } + public class RelatedEntity1839 + { + public int Id { get; set; } - public RelatedEntity1838 ParentEntity { get; set; } + public RelatedEntity1838 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1840 - { - public int Id { get; set; } + public class RelatedEntity1840 + { + public int Id { get; set; } - public RelatedEntity1839 ParentEntity { get; set; } + public RelatedEntity1839 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1841 - { - public int Id { get; set; } + public class RelatedEntity1841 + { + public int Id { get; set; } - public RelatedEntity1840 ParentEntity { get; set; } + public RelatedEntity1840 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1842 - { - public int Id { get; set; } + public class RelatedEntity1842 + { + public int Id { get; set; } - public RelatedEntity1841 ParentEntity { get; set; } + public RelatedEntity1841 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1843 - { - public int Id { get; set; } + public class RelatedEntity1843 + { + public int Id { get; set; } - public RelatedEntity1842 ParentEntity { get; set; } + public RelatedEntity1842 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1844 - { - public int Id { get; set; } + public class RelatedEntity1844 + { + public int Id { get; set; } - public RelatedEntity1843 ParentEntity { get; set; } + public RelatedEntity1843 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1845 - { - public int Id { get; set; } + public class RelatedEntity1845 + { + public int Id { get; set; } - public RelatedEntity1844 ParentEntity { get; set; } + public RelatedEntity1844 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1846 - { - public int Id { get; set; } + public class RelatedEntity1846 + { + public int Id { get; set; } - public RelatedEntity1845 ParentEntity { get; set; } + public RelatedEntity1845 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1847 - { - public int Id { get; set; } + public class RelatedEntity1847 + { + public int Id { get; set; } - public RelatedEntity1846 ParentEntity { get; set; } + public RelatedEntity1846 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1848 - { - public int Id { get; set; } + public class RelatedEntity1848 + { + public int Id { get; set; } - public RelatedEntity1847 ParentEntity { get; set; } + public RelatedEntity1847 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1849 - { - public int Id { get; set; } + public class RelatedEntity1849 + { + public int Id { get; set; } - public RelatedEntity1848 ParentEntity { get; set; } + public RelatedEntity1848 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1850 - { - public int Id { get; set; } + public class RelatedEntity1850 + { + public int Id { get; set; } - public RelatedEntity1849 ParentEntity { get; set; } + public RelatedEntity1849 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1851 - { - public int Id { get; set; } + public class RelatedEntity1851 + { + public int Id { get; set; } - public RelatedEntity1850 ParentEntity { get; set; } + public RelatedEntity1850 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1852 - { - public int Id { get; set; } + public class RelatedEntity1852 + { + public int Id { get; set; } - public RelatedEntity1851 ParentEntity { get; set; } + public RelatedEntity1851 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1853 - { - public int Id { get; set; } + public class RelatedEntity1853 + { + public int Id { get; set; } - public RelatedEntity1852 ParentEntity { get; set; } + public RelatedEntity1852 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1854 - { - public int Id { get; set; } + public class RelatedEntity1854 + { + public int Id { get; set; } - public RelatedEntity1853 ParentEntity { get; set; } + public RelatedEntity1853 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1855 - { - public int Id { get; set; } + public class RelatedEntity1855 + { + public int Id { get; set; } - public RelatedEntity1854 ParentEntity { get; set; } + public RelatedEntity1854 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1856 - { - public int Id { get; set; } + public class RelatedEntity1856 + { + public int Id { get; set; } - public RelatedEntity1855 ParentEntity { get; set; } + public RelatedEntity1855 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1857 - { - public int Id { get; set; } + public class RelatedEntity1857 + { + public int Id { get; set; } - public RelatedEntity1856 ParentEntity { get; set; } + public RelatedEntity1856 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1858 - { - public int Id { get; set; } + public class RelatedEntity1858 + { + public int Id { get; set; } - public RelatedEntity1857 ParentEntity { get; set; } + public RelatedEntity1857 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1859 - { - public int Id { get; set; } + public class RelatedEntity1859 + { + public int Id { get; set; } - public RelatedEntity1858 ParentEntity { get; set; } + public RelatedEntity1858 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1860 - { - public int Id { get; set; } + public class RelatedEntity1860 + { + public int Id { get; set; } - public RelatedEntity1859 ParentEntity { get; set; } + public RelatedEntity1859 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1861 - { - public int Id { get; set; } + public class RelatedEntity1861 + { + public int Id { get; set; } - public RelatedEntity1860 ParentEntity { get; set; } + public RelatedEntity1860 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1862 - { - public int Id { get; set; } + public class RelatedEntity1862 + { + public int Id { get; set; } - public RelatedEntity1861 ParentEntity { get; set; } + public RelatedEntity1861 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1863 - { - public int Id { get; set; } + public class RelatedEntity1863 + { + public int Id { get; set; } - public RelatedEntity1862 ParentEntity { get; set; } + public RelatedEntity1862 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1864 - { - public int Id { get; set; } + public class RelatedEntity1864 + { + public int Id { get; set; } - public RelatedEntity1863 ParentEntity { get; set; } + public RelatedEntity1863 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1865 - { - public int Id { get; set; } + public class RelatedEntity1865 + { + public int Id { get; set; } - public RelatedEntity1864 ParentEntity { get; set; } + public RelatedEntity1864 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1866 - { - public int Id { get; set; } + public class RelatedEntity1866 + { + public int Id { get; set; } - public RelatedEntity1865 ParentEntity { get; set; } + public RelatedEntity1865 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1867 - { - public int Id { get; set; } + public class RelatedEntity1867 + { + public int Id { get; set; } - public RelatedEntity1866 ParentEntity { get; set; } + public RelatedEntity1866 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1868 - { - public int Id { get; set; } + public class RelatedEntity1868 + { + public int Id { get; set; } - public RelatedEntity1867 ParentEntity { get; set; } + public RelatedEntity1867 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1869 - { - public int Id { get; set; } + public class RelatedEntity1869 + { + public int Id { get; set; } - public RelatedEntity1868 ParentEntity { get; set; } + public RelatedEntity1868 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1870 - { - public int Id { get; set; } + public class RelatedEntity1870 + { + public int Id { get; set; } - public RelatedEntity1869 ParentEntity { get; set; } + public RelatedEntity1869 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1871 - { - public int Id { get; set; } + public class RelatedEntity1871 + { + public int Id { get; set; } - public RelatedEntity1870 ParentEntity { get; set; } + public RelatedEntity1870 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1872 - { - public int Id { get; set; } + public class RelatedEntity1872 + { + public int Id { get; set; } - public RelatedEntity1871 ParentEntity { get; set; } + public RelatedEntity1871 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1873 - { - public int Id { get; set; } + public class RelatedEntity1873 + { + public int Id { get; set; } - public RelatedEntity1872 ParentEntity { get; set; } + public RelatedEntity1872 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1874 - { - public int Id { get; set; } + public class RelatedEntity1874 + { + public int Id { get; set; } - public RelatedEntity1873 ParentEntity { get; set; } + public RelatedEntity1873 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1875 - { - public int Id { get; set; } + public class RelatedEntity1875 + { + public int Id { get; set; } - public RelatedEntity1874 ParentEntity { get; set; } + public RelatedEntity1874 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1876 - { - public int Id { get; set; } + public class RelatedEntity1876 + { + public int Id { get; set; } - public RelatedEntity1875 ParentEntity { get; set; } + public RelatedEntity1875 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1877 - { - public int Id { get; set; } + public class RelatedEntity1877 + { + public int Id { get; set; } - public RelatedEntity1876 ParentEntity { get; set; } + public RelatedEntity1876 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1878 - { - public int Id { get; set; } + public class RelatedEntity1878 + { + public int Id { get; set; } - public RelatedEntity1877 ParentEntity { get; set; } + public RelatedEntity1877 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1879 - { - public int Id { get; set; } + public class RelatedEntity1879 + { + public int Id { get; set; } - public RelatedEntity1878 ParentEntity { get; set; } + public RelatedEntity1878 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1880 - { - public int Id { get; set; } + public class RelatedEntity1880 + { + public int Id { get; set; } - public RelatedEntity1879 ParentEntity { get; set; } + public RelatedEntity1879 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1881 - { - public int Id { get; set; } + public class RelatedEntity1881 + { + public int Id { get; set; } - public RelatedEntity1880 ParentEntity { get; set; } + public RelatedEntity1880 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1882 - { - public int Id { get; set; } + public class RelatedEntity1882 + { + public int Id { get; set; } - public RelatedEntity1881 ParentEntity { get; set; } + public RelatedEntity1881 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1883 - { - public int Id { get; set; } + public class RelatedEntity1883 + { + public int Id { get; set; } - public RelatedEntity1882 ParentEntity { get; set; } + public RelatedEntity1882 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1884 - { - public int Id { get; set; } + public class RelatedEntity1884 + { + public int Id { get; set; } - public RelatedEntity1883 ParentEntity { get; set; } + public RelatedEntity1883 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1885 - { - public int Id { get; set; } + public class RelatedEntity1885 + { + public int Id { get; set; } - public RelatedEntity1884 ParentEntity { get; set; } + public RelatedEntity1884 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1886 - { - public int Id { get; set; } + public class RelatedEntity1886 + { + public int Id { get; set; } - public RelatedEntity1885 ParentEntity { get; set; } + public RelatedEntity1885 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1887 - { - public int Id { get; set; } + public class RelatedEntity1887 + { + public int Id { get; set; } - public RelatedEntity1886 ParentEntity { get; set; } + public RelatedEntity1886 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1888 - { - public int Id { get; set; } + public class RelatedEntity1888 + { + public int Id { get; set; } - public RelatedEntity1887 ParentEntity { get; set; } + public RelatedEntity1887 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1889 - { - public int Id { get; set; } + public class RelatedEntity1889 + { + public int Id { get; set; } - public RelatedEntity1888 ParentEntity { get; set; } + public RelatedEntity1888 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1890 - { - public int Id { get; set; } + public class RelatedEntity1890 + { + public int Id { get; set; } - public RelatedEntity1889 ParentEntity { get; set; } + public RelatedEntity1889 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1891 - { - public int Id { get; set; } + public class RelatedEntity1891 + { + public int Id { get; set; } - public RelatedEntity1890 ParentEntity { get; set; } + public RelatedEntity1890 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1892 - { - public int Id { get; set; } + public class RelatedEntity1892 + { + public int Id { get; set; } - public RelatedEntity1891 ParentEntity { get; set; } + public RelatedEntity1891 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1893 - { - public int Id { get; set; } + public class RelatedEntity1893 + { + public int Id { get; set; } - public RelatedEntity1892 ParentEntity { get; set; } + public RelatedEntity1892 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1894 - { - public int Id { get; set; } + public class RelatedEntity1894 + { + public int Id { get; set; } - public RelatedEntity1893 ParentEntity { get; set; } + public RelatedEntity1893 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1895 - { - public int Id { get; set; } + public class RelatedEntity1895 + { + public int Id { get; set; } - public RelatedEntity1894 ParentEntity { get; set; } + public RelatedEntity1894 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1896 - { - public int Id { get; set; } + public class RelatedEntity1896 + { + public int Id { get; set; } - public RelatedEntity1895 ParentEntity { get; set; } + public RelatedEntity1895 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1897 - { - public int Id { get; set; } + public class RelatedEntity1897 + { + public int Id { get; set; } - public RelatedEntity1896 ParentEntity { get; set; } + public RelatedEntity1896 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1898 - { - public int Id { get; set; } + public class RelatedEntity1898 + { + public int Id { get; set; } - public RelatedEntity1897 ParentEntity { get; set; } + public RelatedEntity1897 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1899 - { - public int Id { get; set; } + public class RelatedEntity1899 + { + public int Id { get; set; } - public RelatedEntity1898 ParentEntity { get; set; } + public RelatedEntity1898 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1900 - { - public int Id { get; set; } + public class RelatedEntity1900 + { + public int Id { get; set; } - public RelatedEntity1899 ParentEntity { get; set; } + public RelatedEntity1899 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1901 - { - public int Id { get; set; } + public class RelatedEntity1901 + { + public int Id { get; set; } - public RelatedEntity1900 ParentEntity { get; set; } + public RelatedEntity1900 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1902 - { - public int Id { get; set; } + public class RelatedEntity1902 + { + public int Id { get; set; } - public RelatedEntity1901 ParentEntity { get; set; } + public RelatedEntity1901 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1903 - { - public int Id { get; set; } + public class RelatedEntity1903 + { + public int Id { get; set; } - public RelatedEntity1902 ParentEntity { get; set; } + public RelatedEntity1902 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1904 - { - public int Id { get; set; } + public class RelatedEntity1904 + { + public int Id { get; set; } - public RelatedEntity1903 ParentEntity { get; set; } + public RelatedEntity1903 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1905 - { - public int Id { get; set; } + public class RelatedEntity1905 + { + public int Id { get; set; } - public RelatedEntity1904 ParentEntity { get; set; } + public RelatedEntity1904 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1906 - { - public int Id { get; set; } + public class RelatedEntity1906 + { + public int Id { get; set; } - public RelatedEntity1905 ParentEntity { get; set; } + public RelatedEntity1905 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1907 - { - public int Id { get; set; } + public class RelatedEntity1907 + { + public int Id { get; set; } - public RelatedEntity1906 ParentEntity { get; set; } + public RelatedEntity1906 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1908 - { - public int Id { get; set; } + public class RelatedEntity1908 + { + public int Id { get; set; } - public RelatedEntity1907 ParentEntity { get; set; } + public RelatedEntity1907 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1909 - { - public int Id { get; set; } + public class RelatedEntity1909 + { + public int Id { get; set; } - public RelatedEntity1908 ParentEntity { get; set; } + public RelatedEntity1908 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1910 - { - public int Id { get; set; } + public class RelatedEntity1910 + { + public int Id { get; set; } - public RelatedEntity1909 ParentEntity { get; set; } + public RelatedEntity1909 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1911 - { - public int Id { get; set; } + public class RelatedEntity1911 + { + public int Id { get; set; } - public RelatedEntity1910 ParentEntity { get; set; } + public RelatedEntity1910 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1912 - { - public int Id { get; set; } + public class RelatedEntity1912 + { + public int Id { get; set; } - public RelatedEntity1911 ParentEntity { get; set; } + public RelatedEntity1911 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1913 - { - public int Id { get; set; } + public class RelatedEntity1913 + { + public int Id { get; set; } - public RelatedEntity1912 ParentEntity { get; set; } + public RelatedEntity1912 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1914 - { - public int Id { get; set; } + public class RelatedEntity1914 + { + public int Id { get; set; } - public RelatedEntity1913 ParentEntity { get; set; } + public RelatedEntity1913 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1915 - { - public int Id { get; set; } + public class RelatedEntity1915 + { + public int Id { get; set; } - public RelatedEntity1914 ParentEntity { get; set; } + public RelatedEntity1914 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1916 - { - public int Id { get; set; } + public class RelatedEntity1916 + { + public int Id { get; set; } - public RelatedEntity1915 ParentEntity { get; set; } + public RelatedEntity1915 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1917 - { - public int Id { get; set; } + public class RelatedEntity1917 + { + public int Id { get; set; } - public RelatedEntity1916 ParentEntity { get; set; } + public RelatedEntity1916 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1918 - { - public int Id { get; set; } + public class RelatedEntity1918 + { + public int Id { get; set; } - public RelatedEntity1917 ParentEntity { get; set; } + public RelatedEntity1917 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1919 - { - public int Id { get; set; } + public class RelatedEntity1919 + { + public int Id { get; set; } - public RelatedEntity1918 ParentEntity { get; set; } + public RelatedEntity1918 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1920 - { - public int Id { get; set; } + public class RelatedEntity1920 + { + public int Id { get; set; } - public RelatedEntity1919 ParentEntity { get; set; } + public RelatedEntity1919 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1921 - { - public int Id { get; set; } + public class RelatedEntity1921 + { + public int Id { get; set; } - public RelatedEntity1920 ParentEntity { get; set; } + public RelatedEntity1920 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1922 - { - public int Id { get; set; } + public class RelatedEntity1922 + { + public int Id { get; set; } - public RelatedEntity1921 ParentEntity { get; set; } + public RelatedEntity1921 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1923 - { - public int Id { get; set; } + public class RelatedEntity1923 + { + public int Id { get; set; } - public RelatedEntity1922 ParentEntity { get; set; } + public RelatedEntity1922 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1924 - { - public int Id { get; set; } + public class RelatedEntity1924 + { + public int Id { get; set; } - public RelatedEntity1923 ParentEntity { get; set; } + public RelatedEntity1923 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1925 - { - public int Id { get; set; } + public class RelatedEntity1925 + { + public int Id { get; set; } - public RelatedEntity1924 ParentEntity { get; set; } + public RelatedEntity1924 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1926 - { - public int Id { get; set; } + public class RelatedEntity1926 + { + public int Id { get; set; } - public RelatedEntity1925 ParentEntity { get; set; } + public RelatedEntity1925 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1927 - { - public int Id { get; set; } + public class RelatedEntity1927 + { + public int Id { get; set; } - public RelatedEntity1926 ParentEntity { get; set; } + public RelatedEntity1926 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1928 - { - public int Id { get; set; } + public class RelatedEntity1928 + { + public int Id { get; set; } - public RelatedEntity1927 ParentEntity { get; set; } + public RelatedEntity1927 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1929 - { - public int Id { get; set; } + public class RelatedEntity1929 + { + public int Id { get; set; } - public RelatedEntity1928 ParentEntity { get; set; } + public RelatedEntity1928 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1930 - { - public int Id { get; set; } + public class RelatedEntity1930 + { + public int Id { get; set; } - public RelatedEntity1929 ParentEntity { get; set; } + public RelatedEntity1929 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1931 - { - public int Id { get; set; } + public class RelatedEntity1931 + { + public int Id { get; set; } - public RelatedEntity1930 ParentEntity { get; set; } + public RelatedEntity1930 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1932 - { - public int Id { get; set; } + public class RelatedEntity1932 + { + public int Id { get; set; } - public RelatedEntity1931 ParentEntity { get; set; } + public RelatedEntity1931 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1933 - { - public int Id { get; set; } + public class RelatedEntity1933 + { + public int Id { get; set; } - public RelatedEntity1932 ParentEntity { get; set; } + public RelatedEntity1932 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1934 - { - public int Id { get; set; } + public class RelatedEntity1934 + { + public int Id { get; set; } - public RelatedEntity1933 ParentEntity { get; set; } + public RelatedEntity1933 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1935 - { - public int Id { get; set; } + public class RelatedEntity1935 + { + public int Id { get; set; } - public RelatedEntity1934 ParentEntity { get; set; } + public RelatedEntity1934 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1936 - { - public int Id { get; set; } + public class RelatedEntity1936 + { + public int Id { get; set; } - public RelatedEntity1935 ParentEntity { get; set; } + public RelatedEntity1935 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1937 - { - public int Id { get; set; } + public class RelatedEntity1937 + { + public int Id { get; set; } - public RelatedEntity1936 ParentEntity { get; set; } + public RelatedEntity1936 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1938 - { - public int Id { get; set; } + public class RelatedEntity1938 + { + public int Id { get; set; } - public RelatedEntity1937 ParentEntity { get; set; } + public RelatedEntity1937 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1939 - { - public int Id { get; set; } + public class RelatedEntity1939 + { + public int Id { get; set; } - public RelatedEntity1938 ParentEntity { get; set; } + public RelatedEntity1938 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1940 - { - public int Id { get; set; } + public class RelatedEntity1940 + { + public int Id { get; set; } - public RelatedEntity1939 ParentEntity { get; set; } + public RelatedEntity1939 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1941 - { - public int Id { get; set; } + public class RelatedEntity1941 + { + public int Id { get; set; } - public RelatedEntity1940 ParentEntity { get; set; } + public RelatedEntity1940 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1942 - { - public int Id { get; set; } + public class RelatedEntity1942 + { + public int Id { get; set; } - public RelatedEntity1941 ParentEntity { get; set; } + public RelatedEntity1941 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1943 - { - public int Id { get; set; } + public class RelatedEntity1943 + { + public int Id { get; set; } - public RelatedEntity1942 ParentEntity { get; set; } + public RelatedEntity1942 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1944 - { - public int Id { get; set; } + public class RelatedEntity1944 + { + public int Id { get; set; } - public RelatedEntity1943 ParentEntity { get; set; } + public RelatedEntity1943 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1945 - { - public int Id { get; set; } + public class RelatedEntity1945 + { + public int Id { get; set; } - public RelatedEntity1944 ParentEntity { get; set; } + public RelatedEntity1944 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1946 - { - public int Id { get; set; } + public class RelatedEntity1946 + { + public int Id { get; set; } - public RelatedEntity1945 ParentEntity { get; set; } + public RelatedEntity1945 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1947 - { - public int Id { get; set; } + public class RelatedEntity1947 + { + public int Id { get; set; } - public RelatedEntity1946 ParentEntity { get; set; } + public RelatedEntity1946 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1948 - { - public int Id { get; set; } + public class RelatedEntity1948 + { + public int Id { get; set; } - public RelatedEntity1947 ParentEntity { get; set; } + public RelatedEntity1947 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1949 - { - public int Id { get; set; } + public class RelatedEntity1949 + { + public int Id { get; set; } - public RelatedEntity1948 ParentEntity { get; set; } + public RelatedEntity1948 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1950 - { - public int Id { get; set; } + public class RelatedEntity1950 + { + public int Id { get; set; } - public RelatedEntity1949 ParentEntity { get; set; } + public RelatedEntity1949 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1951 - { - public int Id { get; set; } + public class RelatedEntity1951 + { + public int Id { get; set; } - public RelatedEntity1950 ParentEntity { get; set; } + public RelatedEntity1950 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1952 - { - public int Id { get; set; } + public class RelatedEntity1952 + { + public int Id { get; set; } - public RelatedEntity1951 ParentEntity { get; set; } + public RelatedEntity1951 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1953 - { - public int Id { get; set; } + public class RelatedEntity1953 + { + public int Id { get; set; } - public RelatedEntity1952 ParentEntity { get; set; } + public RelatedEntity1952 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1954 - { - public int Id { get; set; } + public class RelatedEntity1954 + { + public int Id { get; set; } - public RelatedEntity1953 ParentEntity { get; set; } + public RelatedEntity1953 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1955 - { - public int Id { get; set; } + public class RelatedEntity1955 + { + public int Id { get; set; } - public RelatedEntity1954 ParentEntity { get; set; } + public RelatedEntity1954 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1956 - { - public int Id { get; set; } + public class RelatedEntity1956 + { + public int Id { get; set; } - public RelatedEntity1955 ParentEntity { get; set; } + public RelatedEntity1955 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1957 - { - public int Id { get; set; } + public class RelatedEntity1957 + { + public int Id { get; set; } - public RelatedEntity1956 ParentEntity { get; set; } + public RelatedEntity1956 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1958 - { - public int Id { get; set; } + public class RelatedEntity1958 + { + public int Id { get; set; } - public RelatedEntity1957 ParentEntity { get; set; } + public RelatedEntity1957 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1959 - { - public int Id { get; set; } + public class RelatedEntity1959 + { + public int Id { get; set; } - public RelatedEntity1958 ParentEntity { get; set; } + public RelatedEntity1958 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1960 - { - public int Id { get; set; } + public class RelatedEntity1960 + { + public int Id { get; set; } - public RelatedEntity1959 ParentEntity { get; set; } + public RelatedEntity1959 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1961 - { - public int Id { get; set; } + public class RelatedEntity1961 + { + public int Id { get; set; } - public RelatedEntity1960 ParentEntity { get; set; } + public RelatedEntity1960 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1962 - { - public int Id { get; set; } + public class RelatedEntity1962 + { + public int Id { get; set; } - public RelatedEntity1961 ParentEntity { get; set; } + public RelatedEntity1961 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1963 - { - public int Id { get; set; } + public class RelatedEntity1963 + { + public int Id { get; set; } - public RelatedEntity1962 ParentEntity { get; set; } + public RelatedEntity1962 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1964 - { - public int Id { get; set; } + public class RelatedEntity1964 + { + public int Id { get; set; } - public RelatedEntity1963 ParentEntity { get; set; } + public RelatedEntity1963 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1965 - { - public int Id { get; set; } + public class RelatedEntity1965 + { + public int Id { get; set; } - public RelatedEntity1964 ParentEntity { get; set; } + public RelatedEntity1964 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1966 - { - public int Id { get; set; } + public class RelatedEntity1966 + { + public int Id { get; set; } - public RelatedEntity1965 ParentEntity { get; set; } + public RelatedEntity1965 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1967 - { - public int Id { get; set; } + public class RelatedEntity1967 + { + public int Id { get; set; } - public RelatedEntity1966 ParentEntity { get; set; } + public RelatedEntity1966 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1968 - { - public int Id { get; set; } + public class RelatedEntity1968 + { + public int Id { get; set; } - public RelatedEntity1967 ParentEntity { get; set; } + public RelatedEntity1967 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1969 - { - public int Id { get; set; } + public class RelatedEntity1969 + { + public int Id { get; set; } - public RelatedEntity1968 ParentEntity { get; set; } + public RelatedEntity1968 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1970 - { - public int Id { get; set; } + public class RelatedEntity1970 + { + public int Id { get; set; } - public RelatedEntity1969 ParentEntity { get; set; } + public RelatedEntity1969 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1971 - { - public int Id { get; set; } + public class RelatedEntity1971 + { + public int Id { get; set; } - public RelatedEntity1970 ParentEntity { get; set; } + public RelatedEntity1970 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1972 - { - public int Id { get; set; } + public class RelatedEntity1972 + { + public int Id { get; set; } - public RelatedEntity1971 ParentEntity { get; set; } + public RelatedEntity1971 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1973 - { - public int Id { get; set; } + public class RelatedEntity1973 + { + public int Id { get; set; } - public RelatedEntity1972 ParentEntity { get; set; } + public RelatedEntity1972 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1974 - { - public int Id { get; set; } + public class RelatedEntity1974 + { + public int Id { get; set; } - public RelatedEntity1973 ParentEntity { get; set; } + public RelatedEntity1973 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1975 - { - public int Id { get; set; } + public class RelatedEntity1975 + { + public int Id { get; set; } - public RelatedEntity1974 ParentEntity { get; set; } + public RelatedEntity1974 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1976 - { - public int Id { get; set; } + public class RelatedEntity1976 + { + public int Id { get; set; } - public RelatedEntity1975 ParentEntity { get; set; } + public RelatedEntity1975 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1977 - { - public int Id { get; set; } + public class RelatedEntity1977 + { + public int Id { get; set; } - public RelatedEntity1976 ParentEntity { get; set; } + public RelatedEntity1976 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1978 - { - public int Id { get; set; } + public class RelatedEntity1978 + { + public int Id { get; set; } - public RelatedEntity1977 ParentEntity { get; set; } + public RelatedEntity1977 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1979 - { - public int Id { get; set; } + public class RelatedEntity1979 + { + public int Id { get; set; } - public RelatedEntity1978 ParentEntity { get; set; } + public RelatedEntity1978 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1980 - { - public int Id { get; set; } + public class RelatedEntity1980 + { + public int Id { get; set; } - public RelatedEntity1979 ParentEntity { get; set; } + public RelatedEntity1979 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1981 - { - public int Id { get; set; } + public class RelatedEntity1981 + { + public int Id { get; set; } - public RelatedEntity1980 ParentEntity { get; set; } + public RelatedEntity1980 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1982 - { - public int Id { get; set; } + public class RelatedEntity1982 + { + public int Id { get; set; } - public RelatedEntity1981 ParentEntity { get; set; } + public RelatedEntity1981 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1983 - { - public int Id { get; set; } + public class RelatedEntity1983 + { + public int Id { get; set; } - public RelatedEntity1982 ParentEntity { get; set; } + public RelatedEntity1982 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1984 - { - public int Id { get; set; } + public class RelatedEntity1984 + { + public int Id { get; set; } - public RelatedEntity1983 ParentEntity { get; set; } + public RelatedEntity1983 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1985 - { - public int Id { get; set; } + public class RelatedEntity1985 + { + public int Id { get; set; } - public RelatedEntity1984 ParentEntity { get; set; } + public RelatedEntity1984 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1986 - { - public int Id { get; set; } + public class RelatedEntity1986 + { + public int Id { get; set; } - public RelatedEntity1985 ParentEntity { get; set; } + public RelatedEntity1985 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1987 - { - public int Id { get; set; } + public class RelatedEntity1987 + { + public int Id { get; set; } - public RelatedEntity1986 ParentEntity { get; set; } + public RelatedEntity1986 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1988 - { - public int Id { get; set; } + public class RelatedEntity1988 + { + public int Id { get; set; } - public RelatedEntity1987 ParentEntity { get; set; } + public RelatedEntity1987 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1989 - { - public int Id { get; set; } + public class RelatedEntity1989 + { + public int Id { get; set; } - public RelatedEntity1988 ParentEntity { get; set; } + public RelatedEntity1988 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1990 - { - public int Id { get; set; } + public class RelatedEntity1990 + { + public int Id { get; set; } - public RelatedEntity1989 ParentEntity { get; set; } + public RelatedEntity1989 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1991 - { - public int Id { get; set; } + public class RelatedEntity1991 + { + public int Id { get; set; } - public RelatedEntity1990 ParentEntity { get; set; } + public RelatedEntity1990 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1992 - { - public int Id { get; set; } + public class RelatedEntity1992 + { + public int Id { get; set; } - public RelatedEntity1991 ParentEntity { get; set; } + public RelatedEntity1991 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1993 - { - public int Id { get; set; } + public class RelatedEntity1993 + { + public int Id { get; set; } - public RelatedEntity1992 ParentEntity { get; set; } + public RelatedEntity1992 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1994 - { - public int Id { get; set; } + public class RelatedEntity1994 + { + public int Id { get; set; } - public RelatedEntity1993 ParentEntity { get; set; } + public RelatedEntity1993 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1995 - { - public int Id { get; set; } + public class RelatedEntity1995 + { + public int Id { get; set; } - public RelatedEntity1994 ParentEntity { get; set; } + public RelatedEntity1994 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1996 - { - public int Id { get; set; } + public class RelatedEntity1996 + { + public int Id { get; set; } - public RelatedEntity1995 ParentEntity { get; set; } + public RelatedEntity1995 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1997 - { - public int Id { get; set; } + public class RelatedEntity1997 + { + public int Id { get; set; } - public RelatedEntity1996 ParentEntity { get; set; } + public RelatedEntity1996 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1998 - { - public int Id { get; set; } + public class RelatedEntity1998 + { + public int Id { get; set; } - public RelatedEntity1997 ParentEntity { get; set; } + public RelatedEntity1997 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity1999 - { - public int Id { get; set; } + public class RelatedEntity1999 + { + public int Id { get; set; } - public RelatedEntity1998 ParentEntity { get; set; } + public RelatedEntity1998 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } + } - public class RelatedEntity2000 - { - public int Id { get; set; } + public class RelatedEntity2000 + { + public int Id { get; set; } - public RelatedEntity1999 ParentEntity { get; set; } + public RelatedEntity1999 ParentEntity { get; set; } - public IEnumerable ChildEntities { get; set; } - } + public IEnumerable ChildEntities { get; set; } } } diff --git a/test/EFCore.Tests/ModelBuilding/GiantModel.tt b/test/EFCore.Tests/ModelBuilding/GiantModel.tt index 41a3cd43f75..df9550eff11 100644 --- a/test/EFCore.Tests/ModelBuilding/GiantModel.tt +++ b/test/EFCore.Tests/ModelBuilding/GiantModel.tt @@ -1,8 +1,5 @@ <#@ template debug="false" hostspecific="false" language="C#" #> <#@ assembly name="System.Core" #> -<#@ import namespace="System.Linq" #> -<#@ import namespace="System.Text" #> -<#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> <# var NumberOfEntityTypes = 2000; @@ -21,33 +18,33 @@ namespace Microsoft.EntityFrameworkCore.ModelBuilding { public int Id { get; set; } - public RelatedEntity<#=NumberOfEntityTypes#> ParentEntity { get; set; } + public RelatedEntity<#= NumberOfEntityTypes #> ParentEntity { get; set; } public IEnumerable ChildEntities { get; set; } } <# var currentEntityTypeNumber = 2; - for(;currentEntityTypeNumber < NumberOfEntityTypes; currentEntityTypeNumber++ ) + for (; currentEntityTypeNumber < NumberOfEntityTypes; currentEntityTypeNumber++) { #> - public class RelatedEntity<#=currentEntityTypeNumber#> + public class RelatedEntity<#= currentEntityTypeNumber #> { public int Id { get; set; } - public RelatedEntity<#=currentEntityTypeNumber - 1#> ParentEntity { get; set; } + public RelatedEntity<#= currentEntityTypeNumber - 1 #> ParentEntity { get; set; } - public IEnumerable> ChildEntities { get; set; } + public IEnumerable> ChildEntities { get; set; } } <# } #> - public class RelatedEntity<#=currentEntityTypeNumber#> + public class RelatedEntity<#= currentEntityTypeNumber #> { public int Id { get; set; } - public RelatedEntity<#=currentEntityTypeNumber - 1#> ParentEntity { get; set; } + public RelatedEntity<#= currentEntityTypeNumber - 1 #> ParentEntity { get; set; } public IEnumerable ChildEntities { get; set; } } diff --git a/test/EFCore.Tests/ModelBuilding/InheritanceTestBase.cs b/test/EFCore.Tests/ModelBuilding/InheritanceTestBase.cs index 7ac3fabefd1..8f4cf7e47d0 100644 --- a/test/EFCore.Tests/ModelBuilding/InheritanceTestBase.cs +++ b/test/EFCore.Tests/ModelBuilding/InheritanceTestBase.cs @@ -807,10 +807,11 @@ public virtual void Relationships_on_derived_types_are_discovered_first_if_base_ Assert.Empty(modelBuilder.Model.FindEntityType(typeof(CityViewModel)).GetForeignKeys()); - modelBuilder.Entity(c => - { - c.Ignore(c => c.CustomValues); - }); + modelBuilder.Entity( + c => + { + c.Ignore(c => c.CustomValues); + }); Assert.Null(modelBuilder.Model.FindEntityType(typeof(Dictionary))); diff --git a/test/EFCore.Tests/ModelBuilding/ManyToManyTestBase.cs b/test/EFCore.Tests/ModelBuilding/ManyToManyTestBase.cs index 258546f93c3..b9f136e5026 100644 --- a/test/EFCore.Tests/ModelBuilding/ManyToManyTestBase.cs +++ b/test/EFCore.Tests/ModelBuilding/ManyToManyTestBase.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore.Metadata.Internal; -#nullable enable - // ReSharper disable InconsistentNaming namespace Microsoft.EntityFrameworkCore.ModelBuilding; @@ -480,11 +480,7 @@ public virtual void Many_to_many_with_only_Has_navigation_configured() var key = joinEntityType.FindPrimaryKey()!; Assert.Equal( - new[] - { - "ProductsId", - "UniCategoryId" - }, + new[] { "ProductsId", "UniCategoryId" }, key.Properties.Select(p => p.Name)); Assert.DoesNotContain(joinEntityType.GetProperties(), p => !p.IsIndexerProperty()); @@ -525,11 +521,7 @@ public virtual void Many_to_many_with_no_navigations_configured() var key = joinEntityType.FindPrimaryKey()!; Assert.Equal( - new[] - { - "NoCategoryId", - "NoProductId" - }, + new[] { "NoCategoryId", "NoProductId" }, key.Properties.Select(p => p.Name)); Assert.DoesNotContain(joinEntityType.GetProperties(), p => !p.IsIndexerProperty()); @@ -576,11 +568,7 @@ public virtual void Many_to_many_with_a_shadow_navigation() var key = joinEntityType.FindPrimaryKey()!; Assert.Equal( - new[] - { - "DependentsId", - "ShadowId" - }, + new[] { "DependentsId", "ShadowId" }, key.Properties.Select(p => p.Name)); Assert.DoesNotContain(joinEntityType.GetProperties(), p => !p.IsIndexerProperty()); @@ -621,11 +609,7 @@ public virtual void Many_to_many_with_only_With_navigation_configured() var key = joinEntityType.FindPrimaryKey()!; Assert.Equal( - new[] - { - "ProductsId", - "UniCategoryId" - }, + new[] { "ProductsId", "UniCategoryId" }, key.Properties.Select(p => p.Name)); Assert.DoesNotContain(joinEntityType.GetProperties(), p => !p.IsIndexerProperty()); @@ -710,7 +694,8 @@ public virtual void Overrides_ForeignKeyAttribute() var joinEntityType = categoryFk.DeclaringEntityType; Assert.Equal(2, joinEntityType.GetForeignKeys().Count()); - Assert.Equal(new[] {"CategoryWithAttributeId", "ProductWithAttributeId"}, + Assert.Equal( + new[] { "CategoryWithAttributeId", "ProductWithAttributeId" }, joinEntityType.FindPrimaryKey()!.Properties.Select(p => p.Name)); } diff --git a/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericRelationshipTypeTest.cs b/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericRelationshipTypeTest.cs index 8f2f402a127..823b04165ea 100644 --- a/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericRelationshipTypeTest.cs +++ b/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericRelationshipTypeTest.cs @@ -14,7 +14,7 @@ protected override TestModelBuilder CreateTestModelBuilder( Action? configure) => new GenericTypeTestModelBuilder(testHelpers, configure); } - + public class GenericNonRelationshipTest : NonRelationshipTestBase { protected override TestModelBuilder CreateTestModelBuilder( @@ -86,9 +86,10 @@ public override TestEntityTypeBuilder OwnsOne( Expression> navigationExpression, Action> buildAction) where TRelatedEntity : class - => Wrap(EntityTypeBuilder.OwnsOne( - navigationExpression, - r => buildAction(new GenericTypeTestOwnedNavigationBuilder(r)))); + => Wrap( + EntityTypeBuilder.OwnsOne( + navigationExpression, + r => buildAction(new GenericTypeTestOwnedNavigationBuilder(r)))); public override TestReferenceNavigationBuilder HasOne( Expression>? navigationExpression = null) @@ -118,9 +119,11 @@ public override TestPropertyBuilder HasConversion() public override TestPropertyBuilder HasConversion(ValueComparer? valueComparer) => Wrap(PropertyBuilder.HasConversion(typeof(TProvider), valueComparer)); - public override TestPropertyBuilder HasConversion(ValueComparer? valueComparer, ValueComparer? providerComparerType) + public override TestPropertyBuilder HasConversion( + ValueComparer? valueComparer, + ValueComparer? providerComparerType) => Wrap(PropertyBuilder.HasConversion(typeof(TProvider), valueComparer, providerComparerType)); - + public override TestPropertyBuilder HasConversion() => Wrap(PropertyBuilder.HasConversion(typeof(TConverter), typeof(TComparer))); @@ -128,7 +131,8 @@ public override TestPropertyBuilder HasConversion Wrap(PropertyBuilder.HasConversion(typeof(TConverter), typeof(TComparer), typeof(TProviderComparer))); } - private class GenericTypeTestReferenceNavigationBuilder : GenericTestReferenceNavigationBuilder + private class GenericTypeTestReferenceNavigationBuilder : GenericTestReferenceNavigationBuilder where TEntity : class where TRelatedEntity : class { diff --git a/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericTest.cs b/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericTest.cs index 0af74d7cd1c..203c413dee6 100644 --- a/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericTest.cs +++ b/test/EFCore.Tests/ModelBuilding/ModelBuilderGenericTest.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.EntityFrameworkCore.Metadata.Internal; - #nullable enable +using Microsoft.EntityFrameworkCore.Metadata.Internal; + // ReSharper disable InconsistentNaming namespace Microsoft.EntityFrameworkCore.ModelBuilding; @@ -523,45 +523,53 @@ public override TestPropertyBuilder HasConversion() public override TestPropertyBuilder HasConversion(ValueComparer? valueComparer) => Wrap(PropertyBuilder.HasConversion(valueComparer)); - public override TestPropertyBuilder HasConversion(ValueComparer? valueComparer, ValueComparer? providerComparerType) + public override TestPropertyBuilder HasConversion( + ValueComparer? valueComparer, + ValueComparer? providerComparerType) => Wrap(PropertyBuilder.HasConversion(valueComparer, providerComparerType)); public override TestPropertyBuilder HasConversion( Expression> convertToProviderExpression, Expression> convertFromProviderExpression) - => Wrap(PropertyBuilder.HasConversion( - convertToProviderExpression, - convertFromProviderExpression)); + => Wrap( + PropertyBuilder.HasConversion( + convertToProviderExpression, + convertFromProviderExpression)); public override TestPropertyBuilder HasConversion( Expression> convertToProviderExpression, Expression> convertFromProviderExpression, ValueComparer? valueComparer) - => Wrap(PropertyBuilder.HasConversion( - convertToProviderExpression, - convertFromProviderExpression, - valueComparer)); + => Wrap( + PropertyBuilder.HasConversion( + convertToProviderExpression, + convertFromProviderExpression, + valueComparer)); public override TestPropertyBuilder HasConversion( Expression> convertToProviderExpression, Expression> convertFromProviderExpression, ValueComparer? valueComparer, ValueComparer? providerComparerType) - => Wrap(PropertyBuilder.HasConversion( - convertToProviderExpression, - convertFromProviderExpression, - valueComparer, - providerComparerType)); + => Wrap( + PropertyBuilder.HasConversion( + convertToProviderExpression, + convertFromProviderExpression, + valueComparer, + providerComparerType)); public override TestPropertyBuilder HasConversion(ValueConverter converter) => Wrap(PropertyBuilder.HasConversion(converter)); - public override TestPropertyBuilder HasConversion(ValueConverter converter, + public override TestPropertyBuilder HasConversion( + ValueConverter converter, ValueComparer? valueComparer) => Wrap(PropertyBuilder.HasConversion(converter, valueComparer)); - public override TestPropertyBuilder HasConversion(ValueConverter converter, - ValueComparer? valueComparer, ValueComparer? providerComparerType) + public override TestPropertyBuilder HasConversion( + ValueConverter converter, + ValueComparer? valueComparer, + ValueComparer? providerComparerType) => Wrap(PropertyBuilder.HasConversion(converter, valueComparer, providerComparerType)); public override TestPropertyBuilder HasConversion(ValueConverter? converter) @@ -570,7 +578,10 @@ public override TestPropertyBuilder HasConversion(ValueConverter? con public override TestPropertyBuilder HasConversion(ValueConverter? converter, ValueComparer? valueComparer) => Wrap(PropertyBuilder.HasConversion(converter, valueComparer)); - public override TestPropertyBuilder HasConversion(ValueConverter? converter, ValueComparer? valueComparer, ValueComparer? providerComparerType) + public override TestPropertyBuilder HasConversion( + ValueConverter? converter, + ValueComparer? valueComparer, + ValueComparer? providerComparerType) => Wrap(PropertyBuilder.HasConversion(converter, valueComparer, providerComparerType)); public override TestPropertyBuilder HasConversion() diff --git a/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericStringTest.cs b/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericStringTest.cs index 83e6a582a8c..f3133c0bba4 100644 --- a/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericStringTest.cs +++ b/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericStringTest.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Xunit.Sdk; - #nullable enable +using Xunit.Sdk; + // ReSharper disable AssignNullToNotNullAttribute // ReSharper disable InconsistentNaming namespace Microsoft.EntityFrameworkCore.ModelBuilding; diff --git a/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericTest.cs b/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericTest.cs index 0461bb82e30..262aa29ec18 100644 --- a/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericTest.cs +++ b/test/EFCore.Tests/ModelBuilding/ModelBuilderNonGenericTest.cs @@ -603,37 +603,44 @@ public override TestPropertyBuilder HasConversion() public override TestPropertyBuilder HasConversion(ValueComparer? valueComparer) => Wrap(PropertyBuilder.HasConversion(typeof(TConversion), valueComparer)); - public override TestPropertyBuilder HasConversion(ValueComparer? valueComparer, ValueComparer? providerComparerType) + public override TestPropertyBuilder HasConversion( + ValueComparer? valueComparer, + ValueComparer? providerComparerType) => Wrap(PropertyBuilder.HasConversion(typeof(TConversion), valueComparer, providerComparerType)); public override TestPropertyBuilder HasConversion( Expression> convertToProviderExpression, Expression> convertFromProviderExpression) - => Wrap(PropertyBuilder.HasConversion( - new ValueConverter(convertToProviderExpression, convertFromProviderExpression))); + => Wrap( + PropertyBuilder.HasConversion( + new ValueConverter(convertToProviderExpression, convertFromProviderExpression))); public override TestPropertyBuilder HasConversion( Expression> convertToProviderExpression, Expression> convertFromProviderExpression, ValueComparer? valueComparer) - => Wrap(PropertyBuilder.HasConversion( - new ValueConverter(convertToProviderExpression, convertFromProviderExpression), - valueComparer)); + => Wrap( + PropertyBuilder.HasConversion( + new ValueConverter(convertToProviderExpression, convertFromProviderExpression), + valueComparer)); public override TestPropertyBuilder HasConversion( Expression> convertToProviderExpression, Expression> convertFromProviderExpression, ValueComparer? valueComparer, ValueComparer? providerComparerType) - => Wrap(PropertyBuilder.HasConversion( - new ValueConverter(convertToProviderExpression, convertFromProviderExpression), - valueComparer, - providerComparerType)); + => Wrap( + PropertyBuilder.HasConversion( + new ValueConverter(convertToProviderExpression, convertFromProviderExpression), + valueComparer, + providerComparerType)); public override TestPropertyBuilder HasConversion(ValueConverter converter) => Wrap(PropertyBuilder.HasConversion(converter)); - public override TestPropertyBuilder HasConversion(ValueConverter converter, ValueComparer? valueComparer) + public override TestPropertyBuilder HasConversion( + ValueConverter converter, + ValueComparer? valueComparer) => Wrap(PropertyBuilder.HasConversion(converter, valueComparer)); public override TestPropertyBuilder HasConversion( @@ -648,7 +655,10 @@ public override TestPropertyBuilder HasConversion(ValueConverter? con public override TestPropertyBuilder HasConversion(ValueConverter? converter, ValueComparer? valueComparer) => Wrap(PropertyBuilder.HasConversion(converter, valueComparer)); - public override TestPropertyBuilder HasConversion(ValueConverter? converter, ValueComparer? valueComparer, ValueComparer? providerComparerType) + public override TestPropertyBuilder HasConversion( + ValueConverter? converter, + ValueComparer? valueComparer, + ValueComparer? providerComparerType) => Wrap(PropertyBuilder.HasConversion(converter, valueComparer, providerComparerType)); public override TestPropertyBuilder HasConversion() diff --git a/test/EFCore.Tests/ModelBuilding/ModelBuilderTestBase.cs b/test/EFCore.Tests/ModelBuilding/ModelBuilderTestBase.cs index f796983df96..9f262554222 100644 --- a/test/EFCore.Tests/ModelBuilding/ModelBuilderTestBase.cs +++ b/test/EFCore.Tests/ModelBuilding/ModelBuilderTestBase.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.EntityFrameworkCore.Diagnostics.Internal; - #nullable enable +using Microsoft.EntityFrameworkCore.Diagnostics.Internal; + // ReSharper disable InconsistentNaming namespace Microsoft.EntityFrameworkCore.ModelBuilding; @@ -402,7 +402,10 @@ public abstract TestPropertyBuilder HasValueGeneratorFactory HasConversion(); public abstract TestPropertyBuilder HasConversion(ValueComparer? valueComparer); - public abstract TestPropertyBuilder HasConversion(ValueComparer? valueComparer, ValueComparer? providerComparerType); + + public abstract TestPropertyBuilder HasConversion( + ValueComparer? valueComparer, + ValueComparer? providerComparerType); public abstract TestPropertyBuilder HasConversion( Expression> convertToProviderExpression, @@ -420,7 +423,11 @@ public abstract TestPropertyBuilder HasConversion( ValueComparer? providerComparerType); public abstract TestPropertyBuilder HasConversion(ValueConverter converter); - public abstract TestPropertyBuilder HasConversion(ValueConverter converter, ValueComparer? valueComparer); + + public abstract TestPropertyBuilder HasConversion( + ValueConverter converter, + ValueComparer? valueComparer); + public abstract TestPropertyBuilder HasConversion( ValueConverter converter, ValueComparer? valueComparer, @@ -428,7 +435,11 @@ public abstract TestPropertyBuilder HasConversion( public abstract TestPropertyBuilder HasConversion(ValueConverter? converter); public abstract TestPropertyBuilder HasConversion(ValueConverter? converter, ValueComparer? valueComparer); - public abstract TestPropertyBuilder HasConversion(ValueConverter? converter, ValueComparer? valueComparer, ValueComparer? providerComparerType); + + public abstract TestPropertyBuilder HasConversion( + ValueConverter? converter, + ValueComparer? valueComparer, + ValueComparer? providerComparerType); public abstract TestPropertyBuilder HasConversion() where TComparer : ValueComparer; diff --git a/test/EFCore.Tests/ModelBuilding/NonRelationshipTestBase.cs b/test/EFCore.Tests/ModelBuilding/NonRelationshipTestBase.cs index 15f1c0f1b5f..ab350ad9d5b 100644 --- a/test/EFCore.Tests/ModelBuilding/NonRelationshipTestBase.cs +++ b/test/EFCore.Tests/ModelBuilding/NonRelationshipTestBase.cs @@ -417,11 +417,12 @@ public virtual void Conventions_can_be_added() [ConditionalFact] public virtual void Conventions_can_be_removed() { - var modelBuilder = CreateModelBuilder(c => - { - c.Conventions.Add(s => new TestConvention()); - c.Conventions.Remove(typeof(TestConvention)); - }); + var modelBuilder = CreateModelBuilder( + c => + { + c.Conventions.Add(s => new TestConvention()); + c.Conventions.Remove(typeof(TestConvention)); + }); var model = modelBuilder.FinalizeModel(); @@ -431,9 +432,11 @@ public virtual void Conventions_can_be_removed() [ConditionalFact] public virtual void Conventions_can_be_replaced() { - var modelBuilder = CreateModelBuilder(c => - c.Conventions.Replace(s => - new TestDbSetFindingConvention(s.GetService()))); + var modelBuilder = CreateModelBuilder( + c => + c.Conventions.Replace( + s => + new TestDbSetFindingConvention(s.GetService()))); var model = modelBuilder.FinalizeModel(); @@ -445,9 +448,7 @@ protected class TestConvention : IModelInitializedConvention public void ProcessModelInitialized( IConventionModelBuilder modelBuilder, IConventionContext context) - { - modelBuilder.HasAnnotation("foo", "bar"); - } + => modelBuilder.HasAnnotation("foo", "bar"); } protected class TestDbSetFindingConvention : DbSetFindingConvention @@ -460,9 +461,7 @@ public TestDbSetFindingConvention(ProviderConventionSetBuilderDependencies depen public override void ProcessModelInitialized( IConventionModelBuilder modelBuilder, IConventionContext context) - { - modelBuilder.HasAnnotation("foo", "bar"); - } + => modelBuilder.HasAnnotation("foo", "bar"); } [ConditionalFact] @@ -812,7 +811,8 @@ public virtual void Properties_can_have_provider_type_set() b.Property(e => e.Up); b.Property(e => e.Down).HasConversion(); b.Property("Charm").HasConversion>(); - b.Property("Strange").HasConversion(new CustomValueComparer(), new CustomValueComparer()); + b.Property("Strange").HasConversion( + new CustomValueComparer(), new CustomValueComparer()); b.Property("Strange").HasConversion(null); b.Property("Top").HasConversion(new CustomValueComparer()); }); @@ -913,7 +913,8 @@ public virtual void Properties_can_have_custom_type_value_converter_type_set() b => { b.Property(e => e.Up).HasConversion>(); - b.Property(e => e.Down).HasConversion, CustomValueComparer>(); + b.Property(e => e.Down) + .HasConversion, CustomValueComparer>(); b.Property("Charm").HasConversion, CustomValueComparer>(); b.Property("Strange").HasConversion>(); b.Property("Strange").HasConversion(null, null); @@ -971,7 +972,8 @@ public virtual void Properties_can_have_value_converter_set_inline() b.Property(e => e.Up); b.Property(e => e.Down).HasConversion(v => int.Parse(v), v => v.ToString()); b.Property("Charm").HasConversion(v => (long)v, v => (int)v, new CustomValueComparer()); - b.Property("Strange").HasConversion(v => (double)v, v => (float)v, new CustomValueComparer(), new CustomValueComparer()); + b.Property("Strange").HasConversion( + v => (double)v, v => (float)v, new CustomValueComparer(), new CustomValueComparer()); }); var model = modelBuilder.FinalizeModel(); @@ -1013,7 +1015,8 @@ public virtual void Properties_can_have_value_converter_set() b.Property("Charm").HasConversion( new ValueConverter(v => v, v => (int)v), new CustomValueComparer()); b.Property("Strange").HasConversion( - new ValueConverter(v => (double)v, v => (float)v), new CustomValueComparer(), new CustomValueComparer()); + new ValueConverter(v => v, v => (float)v), new CustomValueComparer(), + new CustomValueComparer()); }); var model = modelBuilder.FinalizeModel(); @@ -1147,7 +1150,8 @@ public virtual void Value_converter_configured_on_nullable_type_overrides_non_nu c => { c.Properties().HaveConversion, CustomValueComparer>(); - c.Properties().HaveConversion, CustomValueComparer, CustomValueComparer>(); + c.Properties() + .HaveConversion, CustomValueComparer, CustomValueComparer>(); }); modelBuilder.Entity( diff --git a/test/EFCore.Tests/ModelBuilding/OneToManyTestBase.cs b/test/EFCore.Tests/ModelBuilding/OneToManyTestBase.cs index d28257dee91..6d3e7fe663d 100644 --- a/test/EFCore.Tests/ModelBuilding/OneToManyTestBase.cs +++ b/test/EFCore.Tests/ModelBuilding/OneToManyTestBase.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // ReSharper disable InconsistentNaming + namespace Microsoft.EntityFrameworkCore.ModelBuilding; public abstract partial class ModelBuilderTest diff --git a/test/EFCore.Tests/ModelBuilding/TestModel.cs b/test/EFCore.Tests/ModelBuilding/TestModel.cs index 9bda4b1902c..6432e47f3c8 100644 --- a/test/EFCore.Tests/ModelBuilding/TestModel.cs +++ b/test/EFCore.Tests/ModelBuilding/TestModel.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Dynamic; using System.Runtime.CompilerServices; -#nullable enable - // ReSharper disable UnusedAutoPropertyAccessor.Local namespace Microsoft.EntityFrameworkCore.ModelBuilding; diff --git a/test/EFCore.Tests/ModelSourceTest.cs b/test/EFCore.Tests/ModelSourceTest.cs index 4f081ec6871..0704d9beb84 100644 --- a/test/EFCore.Tests/ModelSourceTest.cs +++ b/test/EFCore.Tests/ModelSourceTest.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.EntityFrameworkCore.Diagnostics.Internal; -using Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; // ReSharper disable UnusedMember.Local diff --git a/test/EFCore.Tests/SharedTypeDbSetTest.cs b/test/EFCore.Tests/SharedTypeDbSetTest.cs index cbcb8a05fa2..6b459a7be2e 100644 --- a/test/EFCore.Tests/SharedTypeDbSetTest.cs +++ b/test/EFCore.Tests/SharedTypeDbSetTest.cs @@ -713,12 +713,23 @@ private class TheGu private class EarlyLearningCenter : DbContext { - public DbSet Product1s => Set("Product1"); - public DbSet Product2s => Set("Product2"); - public DbSet Category1s => Set("Category1"); - public DbSet Category2s => Set("Category2"); - public DbSet Gu1s => Set("TheGu1"); - public DbSet Gu2s => Set("TheGu2"); + public DbSet Product1s + => Set("Product1"); + + public DbSet Product2s + => Set("Product2"); + + public DbSet Category1s + => Set("Category1"); + + public DbSet Category2s + => Set("Category2"); + + public DbSet Gu1s + => Set("TheGu1"); + + public DbSet Gu2s + => Set("TheGu2"); protected internal override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder diff --git a/test/EFCore.Tests/Storage/ExecutionStrategyTest.cs b/test/EFCore.Tests/Storage/ExecutionStrategyTest.cs index ebbe06156e6..ec9aca9e4e9 100644 --- a/test/EFCore.Tests/Storage/ExecutionStrategyTest.cs +++ b/test/EFCore.Tests/Storage/ExecutionStrategyTest.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Concurrent; using System.Transactions; // ReSharper disable AccessToModifiedClosure @@ -643,15 +642,16 @@ public async Task ExecuteAsync_preserves_synchronization_context_across_retries( { var executionCount = 0; - await mockExecutionStrategy.ExecuteAsync(async _ => - { - Assert.Same(syncContext, SynchronizationContext.Current); - await Task.Yield(); - if (executionCount++ < 1) + await mockExecutionStrategy.ExecuteAsync( + async _ => { - throw new DbUpdateConcurrencyException(""); - } - }, cancellationToken: default); + Assert.Same(syncContext, SynchronizationContext.Current); + await Task.Yield(); + if (executionCount++ < 1) + { + throw new DbUpdateConcurrencyException(""); + } + }, cancellationToken: default); } finally { diff --git a/test/EFCore.Tests/Storage/ValueComparerTest.cs b/test/EFCore.Tests/Storage/ValueComparerTest.cs index 4547169c4a6..5d77bf9a0cd 100644 --- a/test/EFCore.Tests/Storage/ValueComparerTest.cs +++ b/test/EFCore.Tests/Storage/ValueComparerTest.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; - namespace Microsoft.EntityFrameworkCore.Storage; public class ValueComparerTest @@ -30,7 +28,7 @@ public void Throws_for_comparer_with_wrong_type() CoreStrings.ComparerPropertyMismatch("double", nameof(Foo), nameof(Foo.Bar), "int"), Assert.Throws(() => context.Model).Message); } - + private class InvalidDbContext : DbContext { protected internal override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) diff --git a/test/EFCore.Trimming.Tests/Program.cs b/test/EFCore.Trimming.Tests/Program.cs index 7d7d2e557ea..5a3eef1f5a8 100644 --- a/test/EFCore.Trimming.Tests/Program.cs +++ b/test/EFCore.Trimming.Tests/Program.cs @@ -27,10 +27,7 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) static BlogContext() { - var builder = new SqlConnectionStringBuilder(TestEnvironment.DefaultConnection) - { - InitialCatalog = "TrimmingTests" - }; + var builder = new SqlConnectionStringBuilder(TestEnvironment.DefaultConnection) { InitialCatalog = "TrimmingTests" }; ConnectionString = builder.ToString(); } @@ -41,4 +38,3 @@ public class Blog public int Id { get; set; } public string Name { get; set; } } -