DataC.CoreApi 10.0.1

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

DataC.CoreApi

Biblioteca base compartilhada por todas as APIs da Data C. Concentra a infraestrutura comum (autenticação/permissões, acesso a dados, HTTP clients, logging, mensageria, helpers) para que cada API implemente apenas sua regra de negócio específica.

Instalação

dotnet add package DataC.CoreApi

Registro de dependências

No Program.cs/Startup.cs da API consumidora:

builder.Services.ResolveCoreDependencies(MIOAppName: "nome-da-app-no-mio-auth");
builder.Services.AddEntityLog(SistemaEnum.MeuSistema, connectionStringRabbitMQ);
builder.Services.AddContextMonitorService(SistemaEnum.MeuSistema);
builder.Services.AddMessageBus(connectionStringRabbitMQ);
builder.Services.AddKissLogService();

Principais módulos

  • Identidade — validação de JWT (JwtConfig), autorização por claim (CustomAuthorize) e configurações do MIO-Auth.
  • UsuarioIAspNetUser/AspNetUser, abstração para obter usuário, empresa e token da requisição atual.
  • Services/PermissaoUsuarioServices — permissões granulares por recurso/escopo, com cache em memória.
  • Services/PostgresServicesContextBase, base de DbContext com log automático de alterações (auditoria) e suporte a múltiplos bancos por tenant.
  • Services/HttpClientServices — clients tipados (IHttpClientFactory) para integrações (MIO-Auth, MIO-Mailer, ViaCEP, Receita/AWS).
  • Services/EntityLogServices e Services/IntegrationServices — auditoria de entidades e replicação de eventos via mensageria (RabbitMQ).
  • Repositories / Services/ServicesBase — bases genéricas de CRUD e paginação sobre Entity Framework Core.
  • Helpers — utilitários diversos (arquivos texto de largura fixa, Excel, PDF, ZIP, máscaras, tokens, certificados).
  • Notificacoes — padrão de notificação de erros de validação/negócio (Notification Pattern).
  • Configurations — Swagger e KissLog.

Itens obsoletos (mantidos por compatibilidade)

Alguns membros estão marcados com [Obsolete] por apresentarem falhas de design conhecidas (perda de transação, mascaramento de exceções, ausência de validação de assinatura JWT). Evite usá-los em código novo:

  • RepositoryCRUDBase<,> / ServiceBase<,> — prefira uma implementação própria de persistência.
  • MIOTokenHelper — não valida assinatura do JWT.
  • MIOEmailHelper / Models.MIOEmailModels.MIOConfigs — substituídos por MIOMailer2Service.

Suporte

Repositório: https://gitlab.com/datac-stella/datac-coreapi

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
10.0.1 0 7/6/2026
10.0.0.2 136 6/17/2026
10.0.0.1 120 6/16/2026
10.0.0 151 6/13/2026
8.0.3.18 136 6/2/2026
8.0.3.17 128 5/22/2026
8.0.3.16 110 5/22/2026
8.0.3.15 116 5/21/2026
8.0.3.14 104 5/21/2026
8.0.3.13 106 5/21/2026
8.0.3.12 110 5/21/2026 8.0.3.12 is deprecated because it has critical bugs.
8.0.3.11 111 5/21/2026 8.0.3.11 is deprecated because it has critical bugs.
8.0.3.10 119 5/20/2026 8.0.3.10 is deprecated because it has critical bugs.
8.0.3.9 103 5/20/2026
8.0.3.8 1,830 12/1/2025
8.0.3.7 568 11/3/2025
8.0.3.6 577 9/25/2025
8.0.3.5 541 9/16/2025
8.0.3.4 494 9/12/2025
8.0.3.3 404 8/20/2025
Loading failed