Supernova.CSI.FeatureManagmentPack
1.0.0
dotnet add package Supernova.CSI.FeatureManagmentPack --version 1.0.0
NuGet\Install-Package Supernova.CSI.FeatureManagmentPack -Version 1.0.0
<PackageReference Include="Supernova.CSI.FeatureManagmentPack" Version="1.0.0" />
<PackageVersion Include="Supernova.CSI.FeatureManagmentPack" Version="1.0.0" />
<PackageReference Include="Supernova.CSI.FeatureManagmentPack" />
paket add Supernova.CSI.FeatureManagmentPack --version 1.0.0
#r "nuget: Supernova.CSI.FeatureManagmentPack, 1.0.0"
#:package Supernova.CSI.FeatureManagmentPack@1.0.0
#addin nuget:?package=Supernova.CSI.FeatureManagmentPack&version=1.0.0
#tool nuget:?package=Supernova.CSI.FeatureManagmentPack&version=1.0.0
CSI.FeatureManagement
CSI.FeatureManagement is a feature management library for .NET applications, allowing you to enable or disable features for specific users or groups dynamically.
Installation
To install the CSI.FeatureManagement package, use the following command in the NuGet Package Manager Console:
Install-Package CSI.FeatureManagement
Or via .NET CLI:
dotnet add package CSI.FeatureManagement
#Usage
- Step 1: Add the Required Services Before using the feature management functionality, you need to configure the required services in your Program.cs file. This includes adding the FeatureDbContext, IFeatureStorage, and FeatureManager services to the dependency injection (DI) container.
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddDbContext<FeatureDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddScoped<IFeatureStorage, FeatureStorage>();
builder.Services.AddScoped<FeatureManager>();
// Other service registrations...
var app = builder.Build();
- Step 2: Apply Migrations To ensure your database is set up correctly, you need to apply any pending migrations. You can do this by calling ApplyMigrations() on the FeatureManager during application startup.
- Add the following code in Program.cs to apply migrations automatically:
using (var scope = app.Services.CreateScope())
{
var featureManager = scope.ServiceProvider.GetRequiredService<FeatureManager>();
featureManager.ApplyMigrations();
}
- Step 3: Using FeatureManager Once everything is set up, you can use the FeatureManager to manage features and users within your application.
Adding a Feature
var feature = new Feature { Name = "NewFeature", IsEnabled = true };
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributing
We welcome contributions! Please submit a pull request or open an issue to discuss potential improvements or new features.
Contact
For questions or support, please contact CSI Group at CSISupernova@gmail.com.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.8)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 206 | 8/18/2024 |