Skip to content

Commit 8dc90e7

Browse files
committed
Merge in 'release/7.0' changes
2 parents 1123a9a + ea91060 commit 8dc90e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/EFCore.SqlServer/Update/Internal/SqlServerUpdateSqlGenerator.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public class SqlServerUpdateSqlGenerator : UpdateAndSelectSqlGenerator, ISqlServ
1818
private static readonly bool UseOldBehavior30330
1919
= AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue30330", out var enabled30330) && enabled30330;
2020

21+
private static readonly bool LegacyUseOldBehavior30330
22+
= AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue30330 ", out var enabled30330) && enabled30330;
23+
2124
/// <summary>
2225
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
2326
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
@@ -159,7 +162,7 @@ protected override void AppendUpdateColumnValue(
159162
if (columnModification.Property != null)
160163
{
161164
bool needsTypeConversion;
162-
if (!UseOldBehavior30330)
165+
if (!UseOldBehavior30330 && !LegacyUseOldBehavior30330)
163166
{
164167
var propertyClrType = columnModification.Property.GetTypeMapping().Converter?.ProviderClrType
165168
?? columnModification.Property.ClrType;

0 commit comments

Comments
 (0)