Introduction
SQL Server 2025 is super cool π β and naturally, I had to test out the brand-new vector capabilities! If you havenβt checked it out yet, start here:
π https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2025?view=sql-server-ver17
To explore these features, I leaned into one of my favorite playgrounds: eShopLite β a collection of sample scenarios for an eCommerce app with AI-powered Semantic Search. It supports multiple vector database options like Azure AI Search, Qdrant, ChromaDB, and even MCP Servers.
- π¦ Main repo here: https://aka.ms/eshoplite/repo
- π¦ SQL 2025 version here: https://aka.ms/eshoplite/sql2025
I wanted to create a new scenario using SQL 2025. But I hit a couple of snags:
- The
.NET AspireNuGet package for SQL Server defaults to a SQL 2022 image π¬ - Even if I spin up a SQL 2025 container β how do I enable Vector Search and configure Vector Indexes in the SQL DB Engine?
π Here’s how I solved it β in just 2 steps.
Step 1 β Create a SQL 2025 Server in .NET Aspire AppHost
Turns out, SQL 2025 is already available in the public image list in π§ Docker Hub !
The image I needed: mcr.microsoft.com/mssql/server:2025-latest. But Aspire uses 2022-latest by default…
π Solution: Use the right image tag when creating the SQL server resource and that’s it!
( Note: David Fowler guided my in the right direction in this one! )
π See usage here.
var builder = DistributedApplication.CreateBuilder(args);
var sql = builder.AddSqlServer("sql")
.WithLifetime(ContainerLifetime.Persistent)
.WithImageTag("2025-latest")
.WithEnvironment("ACCEPT_EULA", "Y");
var productsDb = sql
.WithDataVolume()
.AddDatabase("productsDb");
π And just like that β I had a SQL Server 2025 instance running in a Docker container via Aspire!
Step 2 β Consume the SQL 2025 Server + Use Vector Search
Once my SQL 2025 instance was running, I needed to connect my app and enable vector search.
π‘ The Aspire helper method .AddSqlServerDbContext<T>() doesn’t support vector search config (yet!)
So I turned to the NuGet package made for this EFCore.SqlServer.VectorSearch.
To make it work, I added this snippet to manually wire up the DB context. π Full source here.
var productsDbConnectionString = builder.Configuration.GetConnectionString("productsDb");
builder.Services.AddDbContext<Context>(options =>
options.UseSqlServer(productsDbConnectionString, o => o.UseVectorSearch()));
Boom π₯ β now my app can access vector indexes, and my Vector Entities can party π.
π§ Bonus: Semantic Search Like a Boss
With vector search enabled, I implemented Semantic Search like this. π Full source here.
var embeddingSearch = embeddingClient.GenerateEmbedding(search, new() { Dimensions = dimensions });
var vectorSearch = embeddingSearch.Value.ToFloats().ToArray();
var products = await db.Product
.OrderBy(p => EF.Functions.VectorDistance("cosine", p.Embedding, vectorSearch))
.Take(3)
.ToListAsync();
β¨ So cool β it’s just a few lines of code, and now I’m doing AI-powered search directly inside SQL Server!
Conclusion
π SQL Server 2025 + .NET Aspire = Vector-powered awesomeness πͺ
Iβve got a vector database running in Docker, wired into my app, and now Iβm semantically searching my products like itβs 2035 π€
If you want to see this in action, Iβve got a π₯ 5-minute demo video coming soon on my YouTube channel.
π Subscribe here: https://youtube.com/elbruno
Stay tuned, stay curious β and go build cool stuff with .NET + AI! ππ§
Happy coding!
Greetings
El Bruno
More posts in my blog ElBruno.com.
More info in https://beacons.ai/elbruno

Leave a reply to Dew Drop β June 24, 2025 (#4445) β Morning Dew by Alvin Ashcraft Cancel reply