Add the extension packages you need before creating the data source. The configuration is then fixed for safe, consistent use, and unused extensions add nothing to the core provider.
var dataSource = new BlueTuskDataSourceBuilder(connectionString)
.UseCitext()
.UseVector()
.UsePostGis()
.Build();
await using var command = dataSource.CreateCommand(
"SELECT embedding <-> $1 FROM catalog ORDER BY 1 LIMIT 10");
command.Parameters.Add(
new BlueTuskParameter<BlueTuskVector>(embedding));
BUILD AN EXTENSION
Add support once for ADO.NET and EF Core.
One extension package can define its .NET values, PostgreSQL conversion, feature details, and optional EF Core support.
01data_object
Define values
Create .NET values that keep the meaning of the PostgreSQL type.
02conversion_path
Convert values
Define how values move between .NET and PostgreSQL in text or binary form.
03flag
Describe the extension
Tell BlueTusk which features the package provides and requires.
04functions
Add EF translation
Add optional LINQ and model support without changing the core provider.