Selecta 0.4.0

dotnet add package Selecta --version 0.4.0
                    
NuGet\Install-Package Selecta -Version 0.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Selecta" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Selecta" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Selecta" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Selecta --version 0.4.0
                    
#r "nuget: Selecta, 0.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Selecta@0.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Selecta&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Selecta&version=0.4.0
                    
Install as a Cake Tool

DataProvider Suite

DataProvider is a complete toolkit for .NET database access that prioritizes type safety in the same way that common ORMs do. It provides source-generated SQL extensions, a cross-database query language, offline-first synchronization, and schema migrations.

Philosophy

DataProvider fixes the issues that have plagued .NET data access for decades:

The simplicity and safety of an ORM but without the issues that come along with them. DataProvider generates extension methods directly from your SQL. You write the queries. You see what executes. SQL errors result in compilation errors. No magic. Intellisense/Autocomplete in SQL coming soon.

Sync data across microservices or create occasionally connected apps that only sync when there is an internet connection.

No Exceptions Database operations fail. Networks drop. Constraints get violated. These aren't exceptional. They're expected. Every DataProvider operation returns Result<T, Error> instead of throwing. Pattern match on the result. Handle both cases explicitly. Your code becomes honest about what can go wrong.

SQL is the source of truth. Your database schema and queries define your application's data model. DataProvider works with this reality instead of fighting it. Define schemas in YAML. Write queries in SQL or LQL. Generate strongly-typed code from both.

The Stack

Component Purpose
DataProvider Source generator: SQL files become type-safe extension methods
LQL Lambda Query Language: Write once, transpile to any SQL dialect
Migrations YAML schemas: Database-agnostic, version-controlled schema definitions
Sync Offline-first: Bidirectional synchronization with conflict resolution
Gatekeeper Auth: WebAuthn authentication and role-based access control

Each component works independently or together. Use what you need.

Quick Example

Write SQL in a .sql file:

-- GetActiveCustomers.sql
SELECT c.Id, c.Name, a.City
FROM Customer c
JOIN Address a ON c.Id = a.CustomerId
WHERE c.IsActive = 1
LIMIT 100;

DataProvider generates type-safe extension methods at compile time:

var result = await connection.GetActiveCustomersAsync(cancellationToken);
if (result.IsSuccess)
{
    foreach (var customer in result.Value)
    {
        Console.WriteLine($"{customer.Name} from {customer.City}");
    }
}

Getting Started

Prerequisites

  • .NET 8.0 or later
  • Visual Studio 2022 or VS Code
  • Database (SQLite, SQL Server, or PostgreSQL)

Installation

# Install the core package and database-specific package
dotnet add package DataProvider
dotnet add package DataProvider.SQLite  # or DataProvider.SqlServer

Build from Source

git clone https://github.com/MelbourneDeveloper/DataProvider.git
cd DataProvider
dotnet build DataProvider.sln
dotnet test
dotnet csharpier .

Performance

All components are designed for maximum performance:

  • Zero runtime overhead: Generated code is pure ADO.NET
  • AOT compatible: Full ahead-of-time compilation support
  • No reflection: All code is generated at compile time
  • Minimal allocations: Optimized for low memory usage

Contributing

The main structure of the projects is not stable. Focus on bug fixes or small functionality additions. Log an issue or start a discussion to check if your ideas match the project goals.

  1. Read the CLAUDE.md file for code style guidelines
  2. Ensure all tests pass
  3. Format code with dotnet csharpier .
  4. Submit pull requests to the main branch
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Selecta:

Package Downloads
DataProvider

A source generator that creates compile-time safe extension methods for database operations from SQL files. Generates strongly-typed C# code based on your SQL queries and database schema, ensuring type safety and eliminating runtime SQL errors.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 34 1/6/2026
0.3.0 41 1/6/2026
0.2.0 37 1/6/2026