From 1b3057741419bd57b6044e2f5694a43ae82270e8 Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Fri, 20 Sep 2024 13:47:19 -0700 Subject: [PATCH] Add missing page to ToC (#4810) Update title for Advanced Performance Topics Reference the released rc1 Fix or suppress warnings --- .../performance/advanced-performance-topics.md | 2 +- entity-framework/toc.yml | 2 ++ .../CommandLine/Properties/launchSettings.json | 12 ++++++++++++ .../Properties/launchSettings.json | 12 ++++++++++++ .../MultiDb/Properties/launchSettings.json | 12 ++++++++++++ .../Properties/launchSettings.json | 12 ++++++++++++ .../NewInEFCore9.CompiledModels/App/App.csproj | 2 +- .../Model/Model.csproj | 8 ++++---- .../CosmosSyncApisSample.cs | 10 ++++++++-- .../HierarchicalPartitionKeysSample.cs | 1 - .../NewInEFCore9.Cosmos.csproj | 2 +- .../NewInEFCore9/NewInEFCore9.csproj | 18 +++++++++--------- .../NewInEFCore9/PrimitiveCollectionsSample.cs | 2 +- .../Properties/launchSettings.json | 12 ++++++++++++ .../Properties/launchSettings.json | 12 ++++++++++++ samples/core/Querying/SqlQueries/Program.cs | 1 + .../Properties/launchSettings.json | 12 ++++++++++++ .../Properties/launchSettings.json | 12 ++++++++++++ 18 files changed, 124 insertions(+), 20 deletions(-) create mode 100644 samples/core/Miscellaneous/CommandLine/Properties/launchSettings.json create mode 100644 samples/core/Miscellaneous/ConfiguringDbContext/Properties/launchSettings.json create mode 100644 samples/core/Miscellaneous/Multitenancy/MultiDb/Properties/launchSettings.json create mode 100644 samples/core/Miscellaneous/Multitenancy/SingleDbSingleTable/Properties/launchSettings.json create mode 100644 samples/core/Performance/AspNetContextPooling/Properties/launchSettings.json create mode 100644 samples/core/Performance/AspNetContextPoolingWithState/Properties/launchSettings.json create mode 100644 samples/core/Schemas/ThreeProjectMigrations/WebApplication1/Properties/launchSettings.json create mode 100644 samples/core/Testing/BloggingWebApi/Properties/launchSettings.json diff --git a/entity-framework/core/performance/advanced-performance-topics.md b/entity-framework/core/performance/advanced-performance-topics.md index 9bd4516206..164759812c 100644 --- a/entity-framework/core/performance/advanced-performance-topics.md +++ b/entity-framework/core/performance/advanced-performance-topics.md @@ -1,5 +1,5 @@ --- -title: Advanced Performance Topics +title: Advanced Performance Topics - EF Core description: Advanced performance topics for Entity Framework Core author: roji ms.date: 9/26/2023 diff --git a/entity-framework/toc.yml b/entity-framework/toc.yml index 4ac3399f45..38d9a2c077 100644 --- a/entity-framework/toc.yml +++ b/entity-framework/toc.yml @@ -21,6 +21,8 @@ href: efcore-and-ef6/porting/port-database.md - name: Porting to a hybrid model href: efcore-and-ef6/porting/port-hybrid.md + - name: Behavior Changes between EF6 and EF Core + href: efcore-and-ef6/porting/port-behavior.md - name: Detailed cases to consider when Porting href: efcore-and-ef6/porting/port-detailed-cases.md - name: Use EF6 and EF Core in the same application diff --git a/samples/core/Miscellaneous/CommandLine/Properties/launchSettings.json b/samples/core/Miscellaneous/CommandLine/Properties/launchSettings.json new file mode 100644 index 0000000000..b26cc61c35 --- /dev/null +++ b/samples/core/Miscellaneous/CommandLine/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "CommandLine": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58213;http://localhost:58218" + } + } +} \ No newline at end of file diff --git a/samples/core/Miscellaneous/ConfiguringDbContext/Properties/launchSettings.json b/samples/core/Miscellaneous/ConfiguringDbContext/Properties/launchSettings.json new file mode 100644 index 0000000000..a2507be0b6 --- /dev/null +++ b/samples/core/Miscellaneous/ConfiguringDbContext/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "ConfiguringDbContext": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58221;http://localhost:58223" + } + } +} \ No newline at end of file diff --git a/samples/core/Miscellaneous/Multitenancy/MultiDb/Properties/launchSettings.json b/samples/core/Miscellaneous/Multitenancy/MultiDb/Properties/launchSettings.json new file mode 100644 index 0000000000..0ae2ccadcf --- /dev/null +++ b/samples/core/Miscellaneous/Multitenancy/MultiDb/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "MultiDb": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58210;http://localhost:58219" + } + } +} \ No newline at end of file diff --git a/samples/core/Miscellaneous/Multitenancy/SingleDbSingleTable/Properties/launchSettings.json b/samples/core/Miscellaneous/Multitenancy/SingleDbSingleTable/Properties/launchSettings.json new file mode 100644 index 0000000000..d273faadba --- /dev/null +++ b/samples/core/Miscellaneous/Multitenancy/SingleDbSingleTable/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "SingleDbSingleTable": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58209;http://localhost:58217" + } + } +} \ No newline at end of file diff --git a/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/App/App.csproj b/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/App/App.csproj index 785143a414..d0893b1f77 100644 --- a/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/App/App.csproj +++ b/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/App/App.csproj @@ -9,7 +9,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/Model/Model.csproj b/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/Model/Model.csproj index af0deefb2e..66c2064a9a 100644 --- a/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/Model/Model.csproj +++ b/samples/core/Miscellaneous/NewInEFCore9.CompiledModels/Model/Model.csproj @@ -15,13 +15,13 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + diff --git a/samples/core/Miscellaneous/NewInEFCore9.Cosmos/CosmosSyncApisSample.cs b/samples/core/Miscellaneous/NewInEFCore9.Cosmos/CosmosSyncApisSample.cs index 0c90397a22..5a19643cdc 100644 --- a/samples/core/Miscellaneous/NewInEFCore9.Cosmos/CosmosSyncApisSample.cs +++ b/samples/core/Miscellaneous/NewInEFCore9.Cosmos/CosmosSyncApisSample.cs @@ -93,13 +93,19 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - => optionsBuilder + { + optionsBuilder = optionsBuilder .ConfigureWarnings(b => b.Log(CosmosEventId.SyncNotSupported)) - .LogTo(Console.WriteLine, LogLevel.Information) .EnableSensitiveDataLogging() .UseCosmos( "https://localhost:8081", "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", "Triangles"); + + if (!quiet) + { + optionsBuilder.LogTo(Console.WriteLine, LogLevel.Information); + } + } } } diff --git a/samples/core/Miscellaneous/NewInEFCore9.Cosmos/HierarchicalPartitionKeysSample.cs b/samples/core/Miscellaneous/NewInEFCore9.Cosmos/HierarchicalPartitionKeysSample.cs index b99ba2b865..e4448501e0 100644 --- a/samples/core/Miscellaneous/NewInEFCore9.Cosmos/HierarchicalPartitionKeysSample.cs +++ b/samples/core/Miscellaneous/NewInEFCore9.Cosmos/HierarchicalPartitionKeysSample.cs @@ -137,7 +137,6 @@ public static async Task UseHierarchicalPartitionKeys() using (var context = new UserSessionContext()) { - var tenantId = "Microsoft"; var sessionId = 7; var userId = new Guid("99A410D7-E467-4CC5-92DE-148F3FC53F4C"); diff --git a/samples/core/Miscellaneous/NewInEFCore9.Cosmos/NewInEFCore9.Cosmos.csproj b/samples/core/Miscellaneous/NewInEFCore9.Cosmos/NewInEFCore9.Cosmos.csproj index f74ca111e6..0e4ad15bea 100644 --- a/samples/core/Miscellaneous/NewInEFCore9.Cosmos/NewInEFCore9.Cosmos.csproj +++ b/samples/core/Miscellaneous/NewInEFCore9.Cosmos/NewInEFCore9.Cosmos.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/core/Miscellaneous/NewInEFCore9/NewInEFCore9.csproj b/samples/core/Miscellaneous/NewInEFCore9/NewInEFCore9.csproj index 227f11b250..39476a1f38 100644 --- a/samples/core/Miscellaneous/NewInEFCore9/NewInEFCore9.csproj +++ b/samples/core/Miscellaneous/NewInEFCore9/NewInEFCore9.csproj @@ -10,15 +10,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/samples/core/Miscellaneous/NewInEFCore9/PrimitiveCollectionsSample.cs b/samples/core/Miscellaneous/NewInEFCore9/PrimitiveCollectionsSample.cs index 3811e2715e..1667738a16 100644 --- a/samples/core/Miscellaneous/NewInEFCore9/PrimitiveCollectionsSample.cs +++ b/samples/core/Miscellaneous/NewInEFCore9/PrimitiveCollectionsSample.cs @@ -176,7 +176,7 @@ public DogWalk(string name) public int Id { get; set; } public string Name { get; set; } public Terrain Terrain { get; set; } - public ReadOnlyCollection DaysVisited { get; set; } + public required ReadOnlyCollection DaysVisited { get; set; } public Pub ClosestPub { get; set; } = null!; } diff --git a/samples/core/Performance/AspNetContextPooling/Properties/launchSettings.json b/samples/core/Performance/AspNetContextPooling/Properties/launchSettings.json new file mode 100644 index 0000000000..0bd72ebfd6 --- /dev/null +++ b/samples/core/Performance/AspNetContextPooling/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "AspNetContextPooling": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58220;http://localhost:58222" + } + } +} \ No newline at end of file diff --git a/samples/core/Performance/AspNetContextPoolingWithState/Properties/launchSettings.json b/samples/core/Performance/AspNetContextPoolingWithState/Properties/launchSettings.json new file mode 100644 index 0000000000..2892dcf901 --- /dev/null +++ b/samples/core/Performance/AspNetContextPoolingWithState/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "AspNetContextPoolingWithState": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58214;http://localhost:58216" + } + } +} \ No newline at end of file diff --git a/samples/core/Querying/SqlQueries/Program.cs b/samples/core/Querying/SqlQueries/Program.cs index 520309a877..a13001a60b 100644 --- a/samples/core/Querying/SqlQueries/Program.cs +++ b/samples/core/Querying/SqlQueries/Program.cs @@ -4,6 +4,7 @@ namespace EFQuerying.RawSQL; +#pragma warning disable EF1002 // Risk of vulnerability to SQL injection. internal class Program { private static void Main(string[] args) diff --git a/samples/core/Schemas/ThreeProjectMigrations/WebApplication1/Properties/launchSettings.json b/samples/core/Schemas/ThreeProjectMigrations/WebApplication1/Properties/launchSettings.json new file mode 100644 index 0000000000..4ea55d68cb --- /dev/null +++ b/samples/core/Schemas/ThreeProjectMigrations/WebApplication1/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "WebApplication1": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58211;http://localhost:58215" + } + } +} \ No newline at end of file diff --git a/samples/core/Testing/BloggingWebApi/Properties/launchSettings.json b/samples/core/Testing/BloggingWebApi/Properties/launchSettings.json new file mode 100644 index 0000000000..117c7b9765 --- /dev/null +++ b/samples/core/Testing/BloggingWebApi/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "BloggingWebApi": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:58208;http://localhost:58212" + } + } +} \ No newline at end of file