This sample shows how to use the native vector functions in EF Core 10 to store and query vector data. You need to have a Azure OpenAI embedding endpoint to run this sample.
More details on vector support in EF Core 10 can be found in the Vector search in the SQL Server EF Core Provider documentation.
Create a .env file from .env.example and fill in the required values, then run the database migration to create the database tables
dotnet tool install --global dotnet-ef
dotnet build
dotnet ef database updateRun the application
dotnet runThe sample will create a database with a Blogs and Posts table and seed it with some data. It will then query the database using the vector functions to find similar blog content to a given topic.