Path: redb/redb.SQLite/Providers/SqliteRoleProvider.cs
Snapshot: redb, 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
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.SQLite/Providers/SqliteRoleProvider.cs
----
using redb.Core.Data;
using redb.Core.Models.Contracts;
using redb.Core.Providers.Base;
using redb.SQLite.Sql;
using Microsoft.Extensions.Logging;
namespace redb.SQLite.Providers;
///
/// SQLite implementation of role provider.
/// Inherits all business logic from RoleProviderBase.
/// Only provides SQLite-specific SQL dialect.
///
/// Usage:
/// services.AddScoped<IRoleProvider, SqliteRoleProvider>();
///
public class SqliteRoleProvider : RoleProviderBase
{
///
/// Creates a new SQLite role provider.
///
/// Database context for executing queries
/// Security context for authorization
/// Optional logger for diagnostics
public SqliteRoleProvider(
IRedbContext context,
IRedbSecurityContext securityContext,
ILogger? logger = null)
: base(context, securityContext, new SqliteDialect(), logger)
{
}
// All business logic is inherited from RoleProviderBase.
// SQLite-specific SQL is provided by SqliteDialect.
// Override virtual methods here for SQLite-specific optimizations if needed.
// For example, using RETURNING clause for insert operations.
}