Path: redb-route/redb.Route.Core/Sql/RedbSqlDataSourceExtensions.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Core/Sql/RedbSqlDataSourceExtensions.cs
----
using redb.Route.Abstractions;
namespace redb.Route.RedbCore.Sql;
/// Registers the sql: data source redb () on a route context.
public static class RedbSqlDataSourceExtensions
{
///
/// Registers under redb, so sql: steps take
/// dataSource=redb and dataSource=redb:<name>. Does nothing when an object is already registered
/// under that name. AddRedbRouteCore calls it for the contexts it configures.
///
/// Route context.
public static IRouteContext AddRedbSqlDataSource(this IRouteContext context)
{
ArgumentNullException.ThrowIfNull(context);
if (context.GetFromRegistry