Oip.Api 0.0.11

dotnet add package Oip.Api --version 0.0.11
                    
NuGet\Install-Package Oip.Api -Version 0.0.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Oip.Api" Version="0.0.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Oip.Api" Version="0.0.11" />
                    
Directory.Packages.props
<PackageReference Include="Oip.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Oip.Api --version 0.0.11
                    
#r "nuget: Oip.Api, 0.0.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Oip.Api@0.0.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Oip.Api&version=0.0.11
                    
Install as a Cake Addin
#tool nuget:?package=Oip.Api&version=0.0.11
                    
Install as a Cake Tool

OIP API Modules Library

The library provides basic infrastructure for creating and managing modules in OIP API applications built on ASP.NET Core.

Overview

The library contains base controllers and classes for working with application modular architecture, including module management, security settings, and database migrations.

Core Components

1. BaseModuleController<TSettings>

Base controller for modules providing common functionality:

  • Security Management: Access rights and roles for modules
  • Module Settings: JSON serialization/deserialization of settings
  • Base Rights: Standard access rights (read, admin)
public abstract class BaseModuleController<TSettings>(ModuleRepository moduleRepository)
: ControllerBase where TSettings : class

2. BaseDbMigrationController<TSettings>

Specialized controller for managing database migrations:

  • Migration Viewing: Get list of all migrations with their status
  • Migration Application: Automatic and manual migration application
  • Administrative Access: Only for users with admin role
public abstract class BaseDbMigrationController<TSettings> : BaseModuleController<TSettings> 
    where TSettings : class

3. ModuleController

Controller for managing system modules:

  • CRUD Operations: Add, remove, and get modules
  • Loading Status: Track loaded modules
  • Administrative Interface: Full system module management

4. FolderModuleController

Example implementation of a specific module - folder module:

  • Inheritance from BaseModuleController: Using base functionality
  • Specific Settings: HTML content for the module
  • Custom Rights: Defining access rights for specific module

Functionality

Security Management

  • Dynamic management of module access rights
  • Role-based security model
  • REST API for rights management

Module Settings

  • Flexible settings system via JSON serialization
  • Instance-specific settings for each module instance
  • Administrative interface for modifying settings

Database Migrations

  • Full control over Entity Framework Core migrations
  • View migration status (applied, pending, existing)
  • Safe migration application via API

Usage

Creating a New Module

[ApiController]
[Route("api/my-module")]
public class MyModuleController : BaseModuleController<MyModuleSettings>
{
    public override List<SecurityResponse> GetModuleRights()
    {
        // Define access rights for the module
    }
}

public class MyModuleSettings
{
    // Specific module settings
}

Working with Migrations

public class MyModuleWithMigrationsController 
    : BaseDbMigrationController<MyModuleSettings>
{
    public MyModuleWithMigrationsController(
        ModuleRepository repository, 
        DbContext dbContext) 
        : base(repository, dbContext)
    {
    }
}

Requirements

  • ASP.NET Core
  • Entity Framework Core
  • Role-based authorization
  • JSON serialization (Newtonsoft.Json)

Security

All administrative operations are protected by the [Authorize(Roles = SecurityConstants.AdminRole)] attribute and are accessible only to users with administrator role.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.0.11 35 1/22/2026
0.0.10 86 1/16/2026
0.0.9 88 1/16/2026
0.0.8 179 12/22/2025
0.0.7 220 12/7/2025
0.0.6 119 12/6/2025
0.0.5 123 12/6/2025
0.0.4 124 12/6/2025
0.0.3 122 12/6/2025