mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Switch to Azure SQL and update EFCore package
Modified Program.cs to use AddAzureSql for ApplicationDbContext with UseVectorSearch and NoTracking options. Updated EFCore.SqlServer.VectorSearch package to version 9.0.0-preview.2 in SqlDatabaseVectorSearch.csproj.
This commit is contained in:
@@ -18,7 +18,7 @@ var appSettings = builder.Services.ConfigureAndGet<AppSettings>(builder.Configur
|
|||||||
|
|
||||||
builder.Services.AddSingleton(TimeProvider.System);
|
builder.Services.AddSingleton(TimeProvider.System);
|
||||||
|
|
||||||
builder.Services.AddSqlServer<ApplicationDbContext>(builder.Configuration.GetConnectionString("SqlConnection"), options =>
|
builder.Services.AddAzureSql<ApplicationDbContext>(builder.Configuration.GetConnectionString("SqlConnection"), options =>
|
||||||
{
|
{
|
||||||
options.UseVectorSearch();
|
options.UseVectorSearch();
|
||||||
}, options =>
|
}, options =>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EFCore.SqlServer.VectorSearch" Version="9.0.0-preview.1" />
|
<PackageReference Include="EFCore.SqlServer.VectorSearch" Version="9.0.0-preview.2" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.3" />
|
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.1" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.1" />
|
||||||
|
|||||||
Reference in New Issue
Block a user