Skip to main content
DubUrl

Database tools for .NET

Work across databases
with less .NET plumbing.

Keep your SQL. DubUrl handles provider resolution,
dialect selection, and query execution.

C# Using DubUrl
// ConnectionString contains your database URL.
var db = new DatabaseUrl(ConnectionString);
var fullName = db.ReadScalarNonNull<string>(
    new SelectFirstCustomer());

One C# call. The SQL for your database.

SelectFirstCustomer.mssql.sql
select [FullName] from [Customer]
where [CustomerId]=1
SelectFirstCustomer.pgsql.sql
select "FullName" from "Customer"
where "CustomerId"=1

Embedded query resources are selected for the target dialect.

ResultNikola Tesla

A real example from our database QA suite. See the SelectFirstCustomer query class

Start in your .NET projectdotnet add package DubUrl

Then install and register your database provider

Connect across your database stack

  • SQL Server
  • PostgreSQL
  • MySQL
  • SQLite
  • DuckDB
  • Snowflake
  • Oracle
  • DatabricksComing soon
Explore supported databases

Choose dialect-specific SQL

Keep SQL in embedded resources. DubUrl selects the query for your database dialect at runtime.

Explore the query API

Read results with less code

Read scalar values or stream rows through a consistent API, with less command and reader boilerplate.

Execute your first query

Define schemas. Generate database-specific SQL.

Validate, render, and deploy schema documents with the DubUrl CLI.

Explore the CLI