Oip.Data
0.0.11
dotnet add package Oip.Data --version 0.0.11
NuGet\Install-Package Oip.Data -Version 0.0.11
<PackageReference Include="Oip.Data" Version="0.0.11" />
<PackageVersion Include="Oip.Data" Version="0.0.11" />
<PackageReference Include="Oip.Data" />
paket add Oip.Data --version 0.0.11
#r "nuget: Oip.Data, 0.0.11"
#:package Oip.Data@0.0.11
#addin nuget:?package=Oip.Data&version=0.0.11
#tool nuget:?package=Oip.Data&version=0.0.11
OIP Data Library
A library for managing modules in ASP.NET Core applications, providing capabilities for automatic module discovery, registration, and management through a database.
Key Features
Module Discovery
- Automatic scanning of loaded assemblies to find modules
- Support for controllers inheriting from
BaseModuleControllerandBaseDbMigrationController - Automatic updating of module metadata in the database
Module Management
- CRUD operations for modules and their instances
- Module settings management
- Hierarchical module structure in menus
Security
- Role-based access model for modules
- Access right management ("read" and others)
- Module filtering based on user roles
Installation and Configuration
Database Migration
To apply migrations and register modules, add to the Program.cs method:
var app = builder.Build();
// Applying migrations and registering modules
app.MigrateDatabase();
Repository Usage
Register the repository in the DI container:
builder.Services.AddScoped<ModuleRepository>();
Module Configuration
Automatic Registration
Modules are automatically discovered based on the following criteria:
- Inherit from
BaseModuleControllerorBaseDbMigrationController - Have a
[Route]attribute for path definition - Module name is derived from the controller name (without the "Controller" suffix)
Manual Management
Use ModuleRepository for manual management:
- Adding/removing modules
- Security configuration
- Settings updates
Usage Example
public class MyModuleController : BaseModuleController
{
[Route("api/mymodule")]
public IActionResult Get()
{
return Ok("My module is working!");
}
}
This module will be automatically discovered and registered with the name "MyModule" and path "/mymodule".
Security
The library supports a role-based security model:
- Each module can have security settings
- Access rights are defined by user roles
- Available modules are filtered based on roles
Use ModuleRepository methods to manage access rights for specific modules.
| 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.AspNetCore.DataProtection.EntityFrameworkCore (>= 8.0.22)
- Microsoft.AspNetCore.SpaProxy (>= 8.0.22)
- Microsoft.EntityFrameworkCore (>= 8.0.22)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.22)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 8.0.11)
- Oip.Settings (>= 1.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Oip.Data:
| Package | Downloads |
|---|---|
|
Oip.Api
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.