NextHelios.EnumLibrary.Data 1.0.3

dotnet add package NextHelios.EnumLibrary.Data --version 1.0.3
                    
NuGet\Install-Package NextHelios.EnumLibrary.Data -Version 1.0.3
                    
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="NextHelios.EnumLibrary.Data" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NextHelios.EnumLibrary.Data" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="NextHelios.EnumLibrary.Data" />
                    
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 NextHelios.EnumLibrary.Data --version 1.0.3
                    
#r "nuget: NextHelios.EnumLibrary.Data, 1.0.3"
                    
#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 NextHelios.EnumLibrary.Data@1.0.3
                    
#: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=NextHelios.EnumLibrary.Data&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=NextHelios.EnumLibrary.Data&version=1.0.3
                    
Install as a Cake Tool

NextHelios.EnumLibrary.Data

Cette librairie est conçue pour être utilisée dans les microservices de l'écosystème NextHelios afin de gérer la connexion à la base de données et l'accès aux énumérations de manière standardisée.

Fonctionnalités

  • Configuration facile via IServiceCollection.
  • Support des requêtes SQL brutes sécurisées.
  • Méthode spécialisée pour récupérer les valeurs d'énumérations par catégorie.
  • Gestion automatique du filtrage des éléments supprimés (IsDeleted = 0).

Installation

Référencez le package NuGet dans votre projet microservice :

dotnet add reference ../ENUM_LIBRARY/NextHelios.EnumLibrary.Data/NextHelios.EnumLibrary.Data.csproj

(Ou installez le fichier .nupkg généré)

Configuration

Dans le fichier Program.cs de votre microservice :

Option 1 : Configuration via appsettings.json

Assurez-vous d'avoir une chaîne de connexion nommée DefaultConnection :

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=...;Database=...;User Id=...;Password=...;"
  }
}

Puis enregistrez le service :

builder.Services.AddEnumDatabase(builder.Configuration);

Option 2 : Configuration manuelle

builder.Services.AddEnumDatabase(options => {
    options.ConnectionString = "VotreChaîneDeConnexion";
});

Utilisation

Injectez IEnumDatabaseService dans vos services ou contrôleurs :

public class MyService
{
    private readonly IEnumDatabaseService _enumService;

    public MyService(IEnumDatabaseService enumService)
    {
        _enumService = enumService;
    }

    public async Task GetValues()
    {
        // Récupérer les codes d'une catégorie (ex: "STATUS")
        var statusCodes = await _enumService.GetEnumerationValuesAsync("STATUS");

        // Exécuter une requête SQL personnalisée
        var codes = await _enumService.QueryAsync<string>("SELECT code FROM ma_table WHERE id = {0}", 123);
    }
}

Tables Requises

La librairie s'attend aux tables suivantes avec ces colonnes minimales :

  • EnumerationCategories : Id, Code, IsDeleted
  • EnumerationValues : Id, CategoryId, Code, IsDeleted

NextHelios Team - 2026

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
1.0.3 96 5/12/2026
1.0.2 91 5/12/2026
1.0.1 93 5/11/2026