Skip to content
Teuz edited this page Apr 3, 2025 · 4 revisions

.NET Database Feature Management

License: MIT

.NET Feature Management Database extends Microsoft.FeatureManagement for retrieving feature definitions from various databases. It provides a robust, database-driven approach to feature flags that integrates smoothly with the .NET ecosystem.

Why Database Feature Management?

Using a database for feature flag management provides several benefits:

  • Centralized storage - Maintain all feature flags in one persistent location
  • Dynamic updates - Change feature settings without application redeployment
  • Shared configuration - Consistent feature state across multiple application instances
  • Audit trail - Track changes to feature flags over time (when using DB capabilities)
  • Complex targeting rules - Store and evaluate sophisticated enabling conditions

Key Features

  • Multiple database providers - Support for Entity Framework Core, Dapper, MongoDB, NHibernate, and Cosmos DB
  • Caching support - Improve performance with built-in caching mechanisms
  • ASP.NET Core integration - Seamless integration with web applications
  • Flexible configuration - Extend default implementations for custom scenarios
  • Standard entity model - Pre-configured entities for features and feature settings
  • Filtering capabilities - Use Microsoft's feature filters for targeting specific audiences

Quick Start Example

// Add the service
services.AddDatabaseFeatureManagement<MyFeatureStore>()
    .WithCacheService();

// Use in your application
if (await featureManager.IsEnabledAsync("BetaFeature"))
{
    // Beta feature code here
}

Getting Started

See the Getting Started guide for basic setup instructions and the Database Providers section for specific database integration details.

See Packages for a complete list of available NuGet packages.

Contributing

For issues, feature requests, or contributions, please visit our GitHub repository.

Clone this wiki locally