Skip to content

Shiny DocumentDb v3: One API, Four Databases

Shiny.SqliteDocumentDb has been rewritten as Shiny.DocumentDb — a multi-provider document store that keeps the same developer-friendly API while supporting four database backends.

  • SQL Server support via Shiny.DocumentDb.SqlServer
  • MySQL support via Shiny.DocumentDb.MySql
  • PostgreSQL support via Shiny.DocumentDb.PostgreSql
  • SQLite continues to work via Shiny.DocumentDb.Sqlite
  • Same APIIDocumentStore, fluent queries, projections, aggregates, transactions, AOT support — all provider-agnostic
  • DI extensions bundled into each provider package — no separate DI package needed

Each provider follows the same pattern — install the provider package and register with DI:

dotnet add package Shiny.DocumentDb.Sqlite
using Shiny.DocumentDb.Sqlite;
services.AddSqliteDocumentStore("Data Source=mydata.db");
dotnet add package Shiny.DocumentDb.SqlServer
using Shiny.DocumentDb.SqlServer;
services.AddSqlServerDocumentStore("Server=localhost;Database=mydb;Trusted_Connection=true;");
dotnet add package Shiny.DocumentDb.MySql
using Shiny.DocumentDb.MySql;
services.AddMySqlDocumentStore("Server=localhost;Database=mydb;User=root;Password=pass;");
dotnet add package Shiny.DocumentDb.PostgreSql
using Shiny.DocumentDb.PostgreSql;
services.AddPostgreSqlDocumentStore("Host=localhost;Database=mydb;Username=postgres;Password=pass;");
v2 Packagev3 Package
Shiny.SqliteDocumentDbShiny.DocumentDb.Sqlite
Shiny.SqliteDocumentDb.Extensions.DependencyInjection(included in provider package)

1. Update using statements:

// Before
using Shiny.SqliteDocumentDb;
using Shiny.SqliteDocumentDb.Extensions.DependencyInjection;
// After
using Shiny.DocumentDb;
using Shiny.DocumentDb.Sqlite;

2. Update DI registration:

// Before
services.AddSqliteDocumentStore("Data Source=mydata.db");
services.AddSqliteDocumentStore(opts => opts.ConnectionString = "Data Source=mydata.db");
// After
services.AddSqliteDocumentStore("Data Source=mydata.db"); // simple overload unchanged
services.AddSqliteDocumentStore(opts =>
{
opts.DatabaseProvider = new SqliteDatabaseProvider("Data Source=mydata.db");
});

3. Update direct instantiation:

// Before
var store = new SqliteDocumentStore(new DocumentStoreOptions
{
ConnectionString = "Data Source=mydata.db"
});
// After
var store = new SqliteDocumentStore(new DocumentStoreOptions
{
DatabaseProvider = new SqliteDatabaseProvider("Data Source=mydata.db")
});
// Or use the convenience constructor (unchanged)
var store = new SqliteDocumentStore("Data Source=mydata.db");

4. IDocumentStore usage is unchanged — all query, CRUD, projection, aggregate, and transaction code works exactly the same.

Full documentation is available at /data/documentdb/.