Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[automated] Merge branch 'release/8.0' => 'release/9.0' #34572

Merged
merged 57 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f53b05a
Merge in 'release/8.0' changes
dotnet-bot May 1, 2024
4ef324f
[internal/release/8.0] Update dependencies from dnceng/internal/dotne…
dotnet-bot May 2, 2024
e7dd349
[internal/release/8.0] Update dependencies from dnceng/internal/dotne…
dotnet-bot May 3, 2024
79322f3
[internal/release/8.0] Update dependencies from dnceng/internal/dotne…
dotnet-bot May 3, 2024
f8d4e85
Merge in 'release/8.0' changes
dotnet-bot May 9, 2024
b5e3d6f
Merge in 'release/8.0' changes
dotnet-bot May 14, 2024
bcda979
Merge in 'release/8.0' changes
dotnet-bot May 17, 2024
f87585f
Merge in 'release/8.0' changes
dotnet-bot May 17, 2024
b3a7017
[internal/release/8.0] Update dependencies from dnceng/internal/dotne…
dotnet-bot May 18, 2024
1b046b4
Merged PR 39795: [internal/release/8.0] Merge from public
vseanreesermsft May 20, 2024
e60bce5
[internal/release/8.0] Update dependencies from dnceng/internal/dotne…
dotnet-bot May 20, 2024
b983f69
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot May 21, 2024
87dd6ec
Merged PR 39846: [internal/release/8.0] Update dependencies from dnce…
dotnet-bot May 21, 2024
bb9a64b
Merge in 'release/8.0' changes
dotnet-bot Jun 4, 2024
c01ffb6
Merge in 'release/8.0' changes
dotnet-bot Jun 10, 2024
7b638e5
[internal/release/8.0] Update dependencies from dnceng/internal/dotne…
dotnet-bot Jun 12, 2024
648ca5c
Merge in 'release/8.0' changes
dotnet-bot Jun 12, 2024
368f641
Merged PR 40368: [internal/release/8.0] Update dependencies from dnce…
dotnet-bot Jun 13, 2024
7ed2261
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Jun 14, 2024
9e63b93
Merged PR 40438: [internal/release/8.0] Update dependencies from dnce…
dotnet-bot Jun 14, 2024
0d1256b
Merge in 'release/8.0' changes
dotnet-bot Jun 14, 2024
76fdde1
Merge commit '3fb9a9fe07b521166f52c4bff34b198dbfc65f12'
Jun 25, 2024
5601c26
[release/8.0] Update image to macOS-12 (#34037)
AndriySvyryd Jul 2, 2024
9732bd2
Merge commit '5601c26b5f4361c89f5c90d81ae5b3f8800f5360'
Jul 2, 2024
01b0cf4
Update branding to 8.0.8 (#34141)
vseanreesermsft Jul 3, 2024
cb2600a
Merge commit '01b0cf44a3a1f1cd242781a5d319e90e34949a22'
Jul 3, 2024
f5012be
Merge commit '0d1256be4658567c8a24b4c027bdbb3dbd6de656' into internal…
vseanreesermsft Jul 9, 2024
168fa5f
Merge pull request #34191 from vseanreesermsft/internal-merge-8.0-202…
maumar Jul 9, 2024
2243cd3
Merge commit '168fa5f7b24067fe7ba83126f0cf12ab65dcdd63'
Jul 9, 2024
38a1ea2
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 11, 2024
4ce4850
Merge commit '38a1ea20451f0891ad576a879a37ac67dd96a380'
Jul 11, 2024
8b6c0de
Enable internal runtime downloads via dSAS (#34217)
mmitche Jul 12, 2024
f2ed96b
Merge commit '8b6c0ded38700b2cc220131ab81677d81530054f'
Jul 12, 2024
65e7cb6
Up SAS timeout to 3 hours (#34229)
mmitche Jul 15, 2024
3b2db3b
Merge commit '65e7cb610848962a63829e41b89931754f8069b0'
Jul 15, 2024
5efec91
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Jul 16, 2024
ecfccf0
Merged PR 41109: [internal/release/8.0] Update dependencies from dnce…
Jul 16, 2024
e7f0165
Merged PR 41160: Temporarily work around '/' in dSAS
mmitche Jul 17, 2024
90d0799
Merged PR 41167: Temporarily work around '/' in dSAS
mmitche Jul 17, 2024
43302cd
Update branding to 8.0.9
vseanreesermsft Aug 6, 2024
114195b
[release/8.0] Update Helix pools (#34232)
AndriySvyryd Aug 6, 2024
7686ab5
[release/8.0] Use placeholder value to fix CredScan (#34342)
AndriySvyryd Aug 6, 2024
9f3091b
[release/8.0] Find the discriminator property even if it is not strin…
AndriySvyryd Aug 10, 2024
fb0aaea
Merge commit '90d079985f33ae91c05b98ecf65e0ce38270ba55' into internal…
vseanreesermsft Aug 13, 2024
9e02c2f
Merge pull request #34425 from vseanreesermsft/internal-merge-8.0-202…
AndriySvyryd Aug 14, 2024
ef52f58
Update branding to 8.0.10 (#34571)
vseanreesermsft Aug 29, 2024
c0fee2f
[release/9.0] Always include generated files in the compilation (#34547)
AndriySvyryd Aug 30, 2024
e49bbfb
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Aug 31, 2024
c7d5045
Map directly to JSON id for types converted to string (#34564) (#34577)
ajcvickers Aug 31, 2024
ce019ce
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Sep 2, 2024
2717558
Update dependencies from https://github.com/dotnet/runtime build 2024…
dotnet-maestro[bot] Sep 2, 2024
972a50a
[release/9.0] Acquire the migrations database lock in a transaction. …
AndriySvyryd Sep 3, 2024
b2e366b
[release/8.0] Update FK ElementType when the FK properties change. (#…
AndriySvyryd Sep 3, 2024
1582f80
[release/9.0] Generate correct calls for complex and primitive proper…
AndriySvyryd Sep 3, 2024
b6bd805
Update Azure.Identity version (#34605)
AndriySvyryd Sep 4, 2024
bc97c2c
[release/9.0] Update Mono.TextTemplating and Microsoft.CodeAnalysis t…
AndriySvyryd Sep 4, 2024
9492cc2
Merge branch 'release/8.0' into release/9.0
AndriySvyryd Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions azure-pipelines-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ stages:
enablePublishTestResults: true
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2019-open
demands: ImageOverride -equals 1es-windows-2022-open
timeoutInMinutes: 90
variables:
- _InternalBuildArgs: ''
Expand Down Expand Up @@ -143,7 +143,7 @@ stages:
timeoutInMinutes: 180
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2019-open
demands: ImageOverride -equals 1es-windows-2022-open
variables:
# Rely on task Arcade injects, not auto-injected build step.
- skipComponentGovernanceDetection: true
Expand Down
60 changes: 30 additions & 30 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.Configuration" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.Extensions.Logging" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<!--
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
All Runtime.$rid packages should have the same version.
-->
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="9.0.0-rc.2.24423.10">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="9.0.0-rc.2.24423.10">
<Dependency Name="System.Text.Json" Version="9.0.0-rc.2.24429.19">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>6f23d04dc2b2039e9eaf97bee2ac02a77ce56b21</Sha>
<Sha>d0f3235d312f7cf9683012b3fe96b2c6f20a1743</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24423.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24429.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>91599268652b51969b8d8088d4f2f2ba7b3ebb19</Sha>
<Sha>d21db44e84b9038ea7b2add139adee2303d46800</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24423.2">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24429.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>91599268652b51969b8d8088d4f2f2ba7b3ebb19</Sha>
<Sha>d21db44e84b9038ea7b2add139adee2303d46800</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24423.2">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24429.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>91599268652b51969b8d8088d4f2f2ba7b3ebb19</Sha>
<Sha>d21db44e84b9038ea7b2add139adee2303d46800</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
28 changes: 14 additions & 14 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
<UsingToolXliff>False</UsingToolXliff>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/runtime">
<MicrosoftExtensionsCachingMemoryVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsConfigurationAbstractionsVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationJsonVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsConfigurationJsonVersion>
<MicrosoftExtensionsDependencyInjectionVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyModelVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
<MicrosoftExtensionsLoggingVersion>9.0.0-rc.2.24423.10</MicrosoftExtensionsLoggingVersion>
<MicrosoftNETCoreAppRefVersion>9.0.0-rc.2.24423.10</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>9.0.0-rc.2.24423.10</MicrosoftNETCoreAppRuntimewinx64Version>
<SystemTextJsonVersion>9.0.0-rc.2.24423.10</SystemTextJsonVersion>
<MicrosoftExtensionsCachingMemoryVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsConfigurationAbstractionsVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationJsonVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsConfigurationJsonVersion>
<MicrosoftExtensionsDependencyInjectionVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyModelVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
<MicrosoftExtensionsLoggingVersion>9.0.0-rc.2.24429.19</MicrosoftExtensionsLoggingVersion>
<MicrosoftNETCoreAppRefVersion>9.0.0-rc.2.24429.19</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>9.0.0-rc.2.24429.19</MicrosoftNETCoreAppRuntimewinx64Version>
<SystemTextJsonVersion>9.0.0-rc.2.24429.19</SystemTextJsonVersion>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/arcade">
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.24423.2</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.24429.5</MicrosoftDotNetBuildTasksTemplatingVersion>
</PropertyGroup>
<PropertyGroup Label="Other dependencies">
<MicrosoftBuildFrameworkVersion>17.9.5</MicrosoftBuildFrameworkVersion>
Expand All @@ -39,7 +39,7 @@
<!-- NB: This version affects Visual Studio compatibility. See https://learn.microsoft.com/visualstudio/extensibility/roslyn-version-support -->
<MicrosoftCodeAnalysisVersion>4.8.0</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisTestingVersion>1.1.2-beta1.24121.1</MicrosoftCodeAnalysisTestingVersion>
<AzureIdentityVersion>1.11.3</AzureIdentityVersion>
<AzureIdentityVersion>1.12.0</AzureIdentityVersion>
<AzureResourceManagerCosmosDBVersion>1.3.2</AzureResourceManagerCosmosDBVersion>
<OpenTelemetryExporterInMemoryVersion>1.8.1</OpenTelemetryExporterInMemoryVersion>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24423.2",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24423.2"
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24429.5",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24429.5"
}
}
20 changes: 13 additions & 7 deletions src/EFCore.Cosmos/Metadata/Conventions/CosmosJsonIdConvention.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,16 @@ private void ProcessEntityType(IConventionEntityType entityType, IConventionCont
{
// If the entity type is not a keyed, root document in the container, then it doesn't have an `id` mapping, so
// undo anything that was done by previous execution of this convention.
if (jsonIdProperty != null)
if (jsonIdProperty is not null)
{
jsonIdProperty.Builder.ToJsonProperty(null);
entityType.Builder.HasNoProperty(jsonIdProperty);
entityType.Builder.RemoveUnusedImplicitProperties([jsonIdProperty]);
}

if (computedIdProperty != null
if (computedIdProperty is not null
&& computedIdProperty != jsonIdProperty)
{
entityType.Builder.HasNoProperty(computedIdProperty);
}
entityType.Builder.RemoveUnusedImplicitProperties([computedIdProperty]); }

return;
}
Expand All @@ -115,10 +114,17 @@ private void ProcessEntityType(IConventionEntityType entityType, IConventionCont
// - IDiscriminatorPropertySetConvention
// - IEntityTypeBaseTypeChangedConvention
var idDefinition = DefinitionFactory.Create((IEntityType)entityType)!;
var keyProperty = (IConventionProperty?)idDefinition.Properties.FirstOrDefault();
if (idDefinition is { IncludesDiscriminator: false, Properties.Count: 1 })
{
var clrType = keyProperty!.GetValueConverter()?.ProviderClrType ?? keyProperty.ClrType;
// If the property maps to a string in the JSON document, then we can use it directly, even if a value converter
// is applied. On the other hand, if it maps to a numeric or bool, then we need to duplicate this to preserve the
// non-string value for queries.
var keyProperty = (IConventionProperty)idDefinition.Properties.First();
var mapping = Dependencies.TypeMappingSource.FindMapping((IProperty)keyProperty);
var clrType = mapping?.Converter?.ProviderClrType
?? mapping?.ClrType
?? keyProperty!.ClrType;

if (clrType == typeof(string))
{
// We are at the point where we are going to map the `id` directly to the PK.
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Design/EFCore.Design.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<PackageReference Include="Microsoft.Build.Locator" Version="1.7.8" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
<PackageReference Include="Microsoft.Extensions.HostFactoryResolver.Sources" PrivateAssets="All" Version="$(MicrosoftExtensionsHostFactoryResolverSourcesVersion)" />
<PackageReference Include="Mono.TextTemplating" Version="3.0.0-preview-0052-g5d0f76c785" />
<PackageReference Include="Mono.TextTemplating" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ protected virtual void GenerateProperty(
var clrType = (FindValueConverter(property)?.ProviderClrType ?? property.ClrType)
.MakeNullable(property.IsNullable);

var propertyBuilderName = $"{entityTypeBuilderName}.Property<{Code.Reference(clrType)}>({Code.Literal(property.Name)})";
var propertyCall = property.IsPrimitiveCollection ? "PrimitiveCollection" : "Property";
var propertyBuilderName = $"{entityTypeBuilderName}.{propertyCall}<{Code.Reference(clrType)}>({Code.Literal(property.Name)})";

stringBuilder
.AppendLine()
Expand Down
14 changes: 14 additions & 0 deletions src/EFCore.Relational/Diagnostics/RelationalEventId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private enum Id
PendingModelChangesWarning,
NonTransactionalMigrationOperationWarning,
AcquiringMigrationLock,
MigrationsUserTransactionWarning,

// Query events
QueryClientEvaluationWarning = CoreEventId.RelationalBaseId + 500,
Expand Down Expand Up @@ -764,6 +765,19 @@ private static EventId MakeMigrationsId(Id id)
/// </remarks>
public static readonly EventId AcquiringMigrationLock = MakeMigrationsId(Id.AcquiringMigrationLock);

/// <summary>
/// A migration lock is being acquired.
/// </summary>
/// <remarks>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Migrations" /> category.
/// </para>
/// <para>
/// This event uses the <see cref="EventData" /> payload when used with a <see cref="DiagnosticSource" />.
/// </para>
/// </remarks>
public static readonly EventId MigrationsUserTransactionWarning = MakeMigrationsId(Id.MigrationsUserTransactionWarning);

private static readonly string _queryPrefix = DbLoggerCategory.Query.Name + ".";

private static EventId MakeQueryId(Id id)
Expand Down
30 changes: 30 additions & 0 deletions src/EFCore.Relational/Diagnostics/RelationalLoggerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2425,6 +2425,36 @@ private static string AcquiringMigrationLock(EventDefinitionBase definition, Eve
return d.GenerateMessage();
}

/// <summary>
/// Logs for the <see cref="RelationalEventId.MigrationsUserTransactionWarning" /> event.
/// </summary>
/// <param name="diagnostics">The diagnostics logger to use.</param>
public static void MigrationsUserTransactionWarning(
this IDiagnosticsLogger<DbLoggerCategory.Migrations> diagnostics)
{
var definition = RelationalResources.LogMigrationsUserTransaction(diagnostics);

if (diagnostics.ShouldLog(definition))
{
definition.Log(diagnostics);
}

if (diagnostics.NeedsEventData(definition, out var diagnosticSourceEnabled, out var simpleLogEnabled))
{
var eventData = new EventData(
definition,
MigrationsUserTransactionWarning);

diagnostics.DispatchEventData(definition, eventData, diagnosticSourceEnabled, simpleLogEnabled);
}
}

private static string MigrationsUserTransactionWarning(EventDefinitionBase definition, EventData payload)
{
var d = (EventDefinition)definition;
return d.GenerateMessage();
}

/// <summary>
/// Logs for the <see cref="RelationalEventId.QueryPossibleUnintendedUseOfEqualsWarning" /> event.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@ public abstract class RelationalLoggingDefinitions : LoggingDefinitions
[EntityFrameworkInternal]
public EventDefinitionBase? LogAcquiringMigrationLock;

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
[EntityFrameworkInternal]
public EventDefinitionBase? LogMigrationsUserTransactionWarning;

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
Expand Down
Loading