From 77f85a2933e6af2463806fb594c8d8eafeeadd39 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 17 Jun 2026 23:07:20 +0000
Subject: [PATCH 1/5] Initial plan
From 6639d9c704ef65f4999cc1bb2969434abfc5942a Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 17 Jun 2026 23:24:39 +0000
Subject: [PATCH 2/5] Fix SqlVector migration default value generation
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
---
.../Internal/MigrationsModelDiffer.cs | 2 +-
.../Storage/RelationalTypeMapping.cs | 12 ++++++
.../Internal/SqlServerVectorTypeMapping.cs | 43 +++++++++++++++++++
3 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
index 3d26327a564..27cad48e086 100644
--- a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
+++ b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
@@ -1247,7 +1247,7 @@ private void Initialize(
columnOperation.DefaultValue = defaultValue
?? (inline || isNullable
? null
- : GetDefaultValue(columnOperation.ClrType));
+ : typeMapping.CreateDefaultColumnValue() ?? GetDefaultValue(columnOperation.ClrType));
columnOperation.DefaultValueSql = column.DefaultValueSql;
columnOperation.ColumnType = column.StoreType;
columnOperation.MaxLength = column.MaxLength;
diff --git a/src/EFCore.Relational/Storage/RelationalTypeMapping.cs b/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
index d2db50c5740..cf522989433 100644
--- a/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
+++ b/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
@@ -656,6 +656,18 @@ public virtual string GenerateProviderValueSqlLiteral(object? value)
protected virtual string GenerateNonNullSqlLiteral(object value)
=> string.Format(CultureInfo.InvariantCulture, SqlLiteralFormatString, value);
+ ///
+ /// Creates the value used to populate a newly added, required column for existing rows when generating a migration.
+ ///
+ ///
+ /// Returning indicates that no type-mapping-specific value is available and that the generic
+ /// default value for the CLR type should be used instead. Type mappings whose facets (such as size) are required to
+ /// produce a usable value should override this to supply a value built from the configured mapping.
+ ///
+ /// The default column value, or to use the generic CLR default value.
+ public virtual object? CreateDefaultColumnValue()
+ => null;
+
///
/// The method to use when reading values of the given type. The method must be defined
/// on or one of its subclasses.
diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
index 0f068bd1f34..50bcce7b6ef 100644
--- a/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
+++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Linq.Expressions;
+using System.Reflection;
using System.Text;
using Microsoft.Data.SqlTypes;
using Microsoft.EntityFrameworkCore.SqlServer.Internal;
@@ -25,6 +27,15 @@ public class SqlServerVectorTypeMapping : RelationalTypeMapping
private static readonly VectorComparer _comparerInstance = new();
+ private static readonly MethodInfo _createNullMethod
+ = typeof(SqlVector).GetMethod(nameof(SqlVector.CreateNull), [typeof(int)])!;
+
+ private static readonly ConstructorInfo _constructor
+ = typeof(SqlVector).GetConstructor([typeof(ReadOnlyMemory)])!;
+
+ private static readonly MethodInfo _memoryImplicitOperator
+ = typeof(ReadOnlyMemory).GetMethod("op_Implicit", [typeof(float[])])!;
+
// Note that dimensions is mandatory with SQL Server vector.
// However, our scaffolder looks up each type mapping without the facets, to find out whether the scaffolded
// facet happens to be the default (and therefore can be omitted). So we allow constructing a SqlServerVectorTypeMapping
@@ -116,6 +127,38 @@ protected override string GenerateNonNullSqlLiteral(object value)
return builder.ToString();
}
+ ///
+ /// 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.
+ ///
+ public override Expression GenerateCodeLiteral(object value)
+ {
+ var vector = (SqlVector)value;
+
+ if (vector.IsNull)
+ {
+ return Expression.Call(_createNullMethod, Expression.Constant(vector.Length));
+ }
+
+ return Expression.New(
+ _constructor,
+ Expression.Convert(
+ Expression.Constant(vector.Memory.ToArray(), typeof(float[])),
+ typeof(ReadOnlyMemory),
+ _memoryImplicitOperator));
+ }
+
+ ///
+ /// 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.
+ ///
+ public override object? CreateDefaultColumnValue()
+ => Size is int dimensions ? new SqlVector(new float[dimensions]) : null;
+
private sealed class VectorComparer() : ValueComparer>(
(x, y) => CalculateEquality(x, y),
v => CalculateHashCode(v),
From c0b7225e55e7489329fe8612ec031fe0ec9911d3 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 17 Jun 2026 23:31:15 +0000
Subject: [PATCH 3/5] Add tests and update API baseline for SqlVector migration
fix
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
---
.../EFCore.Relational.baseline.json | 3 ++
.../Migrations/SqlServerModelDifferTest.cs | 32 +++++++++++++++++++
.../Storage/SqlServerTypeMappingTest.cs | 28 ++++++++++++++++
3 files changed, 63 insertions(+)
diff --git a/src/EFCore.Relational/EFCore.Relational.baseline.json b/src/EFCore.Relational/EFCore.Relational.baseline.json
index 0ab672d5c4c..ecb0cae55f1 100644
--- a/src/EFCore.Relational/EFCore.Relational.baseline.json
+++ b/src/EFCore.Relational/EFCore.Relational.baseline.json
@@ -17582,6 +17582,9 @@
{
"Member": "virtual void ConfigureParameter(System.Data.Common.DbParameter parameter);"
},
+ {
+ "Member": "virtual object? CreateDefaultColumnValue();"
+ },
{
"Member": "virtual System.Data.Common.DbParameter CreateParameter(System.Data.Common.DbCommand command, string name, object? value, bool? nullable = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input);"
},
diff --git a/test/EFCore.SqlServer.Tests/Migrations/SqlServerModelDifferTest.cs b/test/EFCore.SqlServer.Tests/Migrations/SqlServerModelDifferTest.cs
index 0947cb1b534..81107a11d30 100644
--- a/test/EFCore.SqlServer.Tests/Migrations/SqlServerModelDifferTest.cs
+++ b/test/EFCore.SqlServer.Tests/Migrations/SqlServerModelDifferTest.cs
@@ -1,6 +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.Data.SqlTypes;
using Microsoft.EntityFrameworkCore.Migrations.Internal;
using Microsoft.EntityFrameworkCore.SqlServer.Metadata.Internal;
@@ -174,6 +175,37 @@ public void Add_column_with_dependencies()
Assert.Equal("[FirstName] + [LastName]", columnOperation.ComputedColumnSql);
});
+ [Fact]
+ public void Add_required_vector_column_uses_zero_vector_default_value()
+ => Execute(
+ source => source.Entity(
+ "Cat",
+ x =>
+ {
+ x.Property("Id");
+ x.ToTable("Cats");
+ }),
+ target => target.Entity(
+ "Cat",
+ x =>
+ {
+ x.Property("Id");
+ x.ToTable("Cats");
+ x.Property>("Embedding").HasColumnType("vector(3)");
+ }),
+ operations =>
+ {
+ Assert.Equal(1, operations.Count);
+
+ var operation = Assert.IsType(operations[0]);
+ Assert.Equal("Embedding", operation.Name);
+
+ var defaultValue = Assert.IsType>(operation.DefaultValue);
+ Assert.False(defaultValue.IsNull);
+ Assert.Equal(3, defaultValue.Length);
+ Assert.True(defaultValue.Memory.Span.TrimStart(0f).IsEmpty);
+ });
+
[Fact]
public void Alter_column_identity()
=> Execute(
diff --git a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
index 1657cda4b61..c888f16b6f5 100644
--- a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
+++ b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
@@ -420,6 +420,34 @@ public virtual void Vector_comparer_compares_Memory()
Assert.False(typeMapping.Comparer.Equals(vector1, vector3));
}
+ [Fact]
+ public virtual void GenerateCodeLiteral_generates_vector_literal()
+ => Test_GenerateCodeLiteral_helper(
+ new SqlServerVectorTypeMapping(3),
+ new SqlVector(new float[] { 1, 2, 3 }),
+ "new Microsoft.Data.SqlTypes.SqlVector(new[] { 1f, 2f, 3f })");
+
+ [Fact]
+ public virtual void GenerateCodeLiteral_generates_null_vector_literal()
+ => Test_GenerateCodeLiteral_helper(
+ new SqlServerVectorTypeMapping(3),
+ SqlVector.CreateNull(3),
+ "Microsoft.Data.SqlTypes.SqlVector.CreateNull(3)");
+
+ [Fact]
+ public virtual void Vector_default_column_value_is_zero_vector_of_configured_dimensions()
+ {
+ var value = Assert.IsType>(new SqlServerVectorTypeMapping(3).CreateDefaultColumnValue());
+
+ Assert.False(value.IsNull);
+ Assert.Equal(3, value.Length);
+ Assert.True(value.Memory.Span.TrimStart(0f).IsEmpty);
+ }
+
+ [Fact]
+ public virtual void Vector_default_column_value_is_null_without_dimensions()
+ => Assert.Null(SqlServerVectorTypeMapping.Default.CreateDefaultColumnValue());
+
#endregion Vector
public static RelationalTypeMapping GetMapping(string type)
From bd3f3f70339c5715565a00e3ed55fdd74c0a60e7 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 18 Jun 2026 00:24:22 +0000
Subject: [PATCH 4/5] Rename migration default provider hook
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
---
.../EFCore.Relational.baseline.json | 2 +-
.../Internal/MigrationsModelDiffer.cs | 30 ++-----------------
.../Storage/RelationalTypeMapping.cs | 28 ++++++++++++-----
.../Internal/SqlServerVectorTypeMapping.cs | 2 +-
.../Storage/SqlServerTypeMappingTest.cs | 8 ++---
5 files changed, 29 insertions(+), 41 deletions(-)
diff --git a/src/EFCore.Relational/EFCore.Relational.baseline.json b/src/EFCore.Relational/EFCore.Relational.baseline.json
index ecb0cae55f1..50f6ca82d00 100644
--- a/src/EFCore.Relational/EFCore.Relational.baseline.json
+++ b/src/EFCore.Relational/EFCore.Relational.baseline.json
@@ -17583,7 +17583,7 @@
"Member": "virtual void ConfigureParameter(System.Data.Common.DbParameter parameter);"
},
{
- "Member": "virtual object? CreateDefaultColumnValue();"
+ "Member": "virtual object? CreateDefaultProviderValue();"
},
{
"Member": "virtual System.Data.Common.DbParameter CreateParameter(System.Data.Common.DbCommand command, string name, object? value, bool? nullable = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input);"
diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
index 27cad48e086..28419d732c4 100644
--- a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
+++ b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
@@ -1230,24 +1230,11 @@ private void Initialize(
= (valueConverter?.ProviderClrType
?? typeMapping.ClrType).UnwrapNullableType();
- if (!column.TryGetDefaultValue(out var defaultValue))
- {
- // for non-nullable collections of primitives that are mapped to JSON we set a default value corresponding to empty JSON collection
- defaultValue = !inline
- && column is
- {
- IsNullable: false, StoreTypeMapping: { ElementTypeMapping: not null, Converter: { } columnValueConverter }
- }
- && columnValueConverter.GetType() is { IsGenericType: true } columnValueConverterType
- && columnValueConverterType.GetGenericTypeDefinition() == typeof(CollectionToJsonStringConverter<>)
- ? "[]"
- : null;
- }
-
+ column.TryGetDefaultValue(out var defaultValue);
columnOperation.DefaultValue = defaultValue
?? (inline || isNullable
? null
- : typeMapping.CreateDefaultColumnValue() ?? GetDefaultValue(columnOperation.ClrType));
+ : typeMapping.CreateDefaultProviderValue());
columnOperation.DefaultValueSql = column.DefaultValueSql;
columnOperation.ColumnType = column.StoreType;
columnOperation.MaxLength = column.MaxLength;
@@ -2555,19 +2542,6 @@ protected virtual IEnumerable GetSchemas(IRelationalModel model)
.Cast()
.Distinct();
- ///
- /// 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.
- ///
- protected virtual object? GetDefaultValue(Type type)
- => type == typeof(string)
- ? string.Empty
- : type.IsArray
- ? Array.CreateInstance(type.GetElementType()!, 0)
- : type.UnwrapNullableType().GetDefaultValue();
-
private static ValueConverter? GetValueConverter(IProperty property, RelationalTypeMapping? typeMapping = null)
=> (property.FindRelationalTypeMapping() ?? typeMapping)?.Converter;
diff --git a/src/EFCore.Relational/Storage/RelationalTypeMapping.cs b/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
index cf522989433..9923b8e8c86 100644
--- a/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
+++ b/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
@@ -657,16 +657,30 @@ protected virtual string GenerateNonNullSqlLiteral(object value)
=> string.Format(CultureInfo.InvariantCulture, SqlLiteralFormatString, value);
///
- /// Creates the value used to populate a newly added, required column for existing rows when generating a migration.
+ /// Creates the provider value used to populate a newly added, required column for existing rows when generating a migration.
///
///
- /// Returning indicates that no type-mapping-specific value is available and that the generic
- /// default value for the CLR type should be used instead. Type mappings whose facets (such as size) are required to
- /// produce a usable value should override this to supply a value built from the configured mapping.
+ /// Type mappings whose facets (such as size) are required to produce a usable value should override this to supply
+ /// a provider value built from the configured mapping.
///
- /// The default column value, or to use the generic CLR default value.
- public virtual object? CreateDefaultColumnValue()
- => null;
+ /// The default provider value.
+ public virtual object? CreateDefaultProviderValue()
+ {
+ if (ElementTypeMapping is not null
+ && Converter?.GetType() is { IsGenericType: true } converterType
+ && converterType.GetGenericTypeDefinition() == typeof(CollectionToJsonStringConverter<>))
+ {
+ return "[]";
+ }
+
+ var providerType = (Converter?.ProviderClrType ?? ClrType).UnwrapNullableType();
+
+ return providerType == typeof(string)
+ ? string.Empty
+ : providerType.IsArray
+ ? Array.CreateInstance(providerType.GetElementType()!, 0)
+ : providerType.GetDefaultValue();
+ }
///
/// The method to use when reading values of the given type. The method must be defined
diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
index 50bcce7b6ef..30be3cf34c0 100644
--- a/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
+++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
@@ -156,7 +156,7 @@ public override Expression GenerateCodeLiteral(object value)
/// 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.
///
- public override object? CreateDefaultColumnValue()
+ public override object? CreateDefaultProviderValue()
=> Size is int dimensions ? new SqlVector(new float[dimensions]) : null;
private sealed class VectorComparer() : ValueComparer>(
diff --git a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
index c888f16b6f5..e8baf685926 100644
--- a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
+++ b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
@@ -435,9 +435,9 @@ public virtual void GenerateCodeLiteral_generates_null_vector_literal()
"Microsoft.Data.SqlTypes.SqlVector.CreateNull(3)");
[Fact]
- public virtual void Vector_default_column_value_is_zero_vector_of_configured_dimensions()
+ public virtual void Vector_default_provider_value_is_zero_vector_of_configured_dimensions()
{
- var value = Assert.IsType>(new SqlServerVectorTypeMapping(3).CreateDefaultColumnValue());
+ var value = Assert.IsType>(new SqlServerVectorTypeMapping(3).CreateDefaultProviderValue());
Assert.False(value.IsNull);
Assert.Equal(3, value.Length);
@@ -445,8 +445,8 @@ public virtual void Vector_default_column_value_is_zero_vector_of_configured_dim
}
[Fact]
- public virtual void Vector_default_column_value_is_null_without_dimensions()
- => Assert.Null(SqlServerVectorTypeMapping.Default.CreateDefaultColumnValue());
+ public virtual void Vector_default_provider_value_is_null_without_dimensions()
+ => Assert.Null(SqlServerVectorTypeMapping.Default.CreateDefaultProviderValue());
#endregion Vector
From 541e0672999730a8a6950afd5e574cad0b351515 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 18 Jun 2026 00:43:43 +0000
Subject: [PATCH 5/5] Rename default provider hook getter
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
---
src/EFCore.Relational/EFCore.Relational.baseline.json | 2 +-
.../Migrations/Internal/MigrationsModelDiffer.cs | 2 +-
src/EFCore.Relational/Storage/RelationalTypeMapping.cs | 2 +-
.../Storage/Internal/SqlServerVectorTypeMapping.cs | 2 +-
.../Storage/SqlServerTypeMappingTest.cs | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/EFCore.Relational/EFCore.Relational.baseline.json b/src/EFCore.Relational/EFCore.Relational.baseline.json
index 50f6ca82d00..d42eb241b24 100644
--- a/src/EFCore.Relational/EFCore.Relational.baseline.json
+++ b/src/EFCore.Relational/EFCore.Relational.baseline.json
@@ -17583,7 +17583,7 @@
"Member": "virtual void ConfigureParameter(System.Data.Common.DbParameter parameter);"
},
{
- "Member": "virtual object? CreateDefaultProviderValue();"
+ "Member": "virtual object? GetDefaultProviderValue();"
},
{
"Member": "virtual System.Data.Common.DbParameter CreateParameter(System.Data.Common.DbCommand command, string name, object? value, bool? nullable = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input);"
diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
index 28419d732c4..750e0401629 100644
--- a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
+++ b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs
@@ -1234,7 +1234,7 @@ private void Initialize(
columnOperation.DefaultValue = defaultValue
?? (inline || isNullable
? null
- : typeMapping.CreateDefaultProviderValue());
+ : typeMapping.GetDefaultProviderValue());
columnOperation.DefaultValueSql = column.DefaultValueSql;
columnOperation.ColumnType = column.StoreType;
columnOperation.MaxLength = column.MaxLength;
diff --git a/src/EFCore.Relational/Storage/RelationalTypeMapping.cs b/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
index 9923b8e8c86..f6ecfe26141 100644
--- a/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
+++ b/src/EFCore.Relational/Storage/RelationalTypeMapping.cs
@@ -664,7 +664,7 @@ protected virtual string GenerateNonNullSqlLiteral(object value)
/// a provider value built from the configured mapping.
///
/// The default provider value.
- public virtual object? CreateDefaultProviderValue()
+ public virtual object? GetDefaultProviderValue()
{
if (ElementTypeMapping is not null
&& Converter?.GetType() is { IsGenericType: true } converterType
diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
index 30be3cf34c0..0425b24a77d 100644
--- a/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
+++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerVectorTypeMapping.cs
@@ -156,7 +156,7 @@ public override Expression GenerateCodeLiteral(object value)
/// 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.
///
- public override object? CreateDefaultProviderValue()
+ public override object? GetDefaultProviderValue()
=> Size is int dimensions ? new SqlVector(new float[dimensions]) : null;
private sealed class VectorComparer() : ValueComparer>(
diff --git a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
index e8baf685926..6ebf613e629 100644
--- a/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
+++ b/test/EFCore.SqlServer.Tests/Storage/SqlServerTypeMappingTest.cs
@@ -437,7 +437,7 @@ public virtual void GenerateCodeLiteral_generates_null_vector_literal()
[Fact]
public virtual void Vector_default_provider_value_is_zero_vector_of_configured_dimensions()
{
- var value = Assert.IsType>(new SqlServerVectorTypeMapping(3).CreateDefaultProviderValue());
+ var value = Assert.IsType>(new SqlServerVectorTypeMapping(3).GetDefaultProviderValue());
Assert.False(value.IsNull);
Assert.Equal(3, value.Length);
@@ -446,7 +446,7 @@ public virtual void Vector_default_provider_value_is_zero_vector_of_configured_d
[Fact]
public virtual void Vector_default_provider_value_is_null_without_dimensions()
- => Assert.Null(SqlServerVectorTypeMapping.Default.CreateDefaultProviderValue());
+ => Assert.Null(SqlServerVectorTypeMapping.Default.GetDefaultProviderValue());
#endregion Vector