NEW RasterizedDB 1.1.0 is out: sharding and the gateway, the message broker, roles and row-level security, compression, .NET on NuGet, and the enterprise edition. What's new ›
.NET NEW IN 1.1.0

ADO.NET and EF Core, on the native protocol.

RasterizedDb.Data, an ADO.NET driver, and RasterizedDb.EntityFrameworkCore, an Entity Framework Core provider, both over rastcp. EF Core 10 on .NET 10, EF Core 9 on .NET 8 and 9.

RasterizedDb.Data, RasterizedDb.EntityFrameworkCore and RasterizedDb.Messaging 1.1.0 are on nuget.org.

1 / 3

ADO.NET

  • DbConnection, DbCommand, DbDataReader, DbDataSource, with pooling
  • TLS 1.3 with SCRAM channel binding, or a unix socket with peer login
  • Two result formats: Binary, the native cells with no parsing, and Text, with column names for Dapper and DataTable
  • Repeated statements answered from the server's learned parse
  • Multiplexed commands, batches, a migrator, and the KV cache as typed calls
C#
await using var source = new RasterizedDbDataSource(
    "Host=db.example.com;Username=app;Password=secret;Database=shop");
await using var connection = await source.OpenConnectionAsync();
await using var command = new RasterizedDbCommand(
    "SELECT id, name FROM users WHERE age > @age", connection);
command.Parameters.Add("age", 30);
await using var reader = await command.ExecuteReaderAsync();
while (reader.Read())
    Console.WriteLine($"{reader.GetInt64(0)} {reader.GetString(1)}");
2 / 3

Entity Framework Core

  • Generated SQL runs in Binary; raw SQL and migrations in Text, chosen for you
  • Batched saves, JSON and array columns, LINQ over arrays as IN lists
  • Scaffolding of tables and views, and a migrations lock
C#
services.AddDbContext<ShopContext>(o =>
    o.UseRasterizedDb("Host=db.example.com;Username=app;Password=secret;Database=shop"));
3 / 3

Or keep SQL Server's client

An existing EF Core application on Microsoft.Data.SqlClient can stay on the SQL Server front end with only its connection string changed; the native provider is for new code that wants the shortest path.

  • See the SQL Server protocol page
✓ page rendered in 122 µs axum + tera + htmx · no other javascript