Coject.Core.Logging.AspNetCore 1.2.0

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

Coject.Core.Logging.AspNetCore

This package is a provider-neutral ASP.NET Core execution seam and transport base-class surface for custom procedures. It does not construct a database object, understand a legacy response type, or implement application authorization. The host supplies those parts through ICustomProcedureDalFactory<TDal, TRequest>, ICustomProcedureExecutor<TDal, TRequest, TLegacyResult>, and ICustomProcedureResponseMapper<TLegacyResult>.

The mapper returns CustomProcedureMappedResult.Single or .Batch, pairing the legacy response with the existing Core ICustomProcedureResult. The adapter then delegates semantic operational/audit mapping to ICustomProcedureTelemetry and hands authorization denials to the Contracts ICojectAuthorizationDeniedRecorder. Validation and denial paths expose only bounded safe codes to the default response mapper and never log request bodies, tokens, exception text, or provider values.

The current repository has no application-local CustomProcedureControllerBase and no generic legacy custom-procedure controller contract. Consequently this project intentionally does not reproduce controller-specific Baha behavior, attribute conventions, or DAL response classes. It does provide three explicit transport-shape base classes for Workshop-generated custom controllers. A provider/application adapter must implement provider-specific details at the three seams above.

Installation and dependency boundary

The current package version is 1.1.0. A minimal ASP.NET Core application can reference it with the framework and package references below:

<ItemGroup>
  <FrameworkReference Include="Microsoft.AspNetCore.App" />
  <PackageReference Include="Coject.Core.Logging.AspNetCore" Version="1.1.0" />
</ItemGroup>

This package declares the aligned runtime dependencies Coject.Core.Logging 1.3.0 and Coject.Core.Logging.Contracts 3.1.0.

When a Workshop-generated custom-controller artifact is compiled into the application, the artifact conditionally requires all three runtime packages:

<ItemGroup>
  <PackageReference Include="Coject.Core.Logging.Contracts" Version="3.1.0" />
  <PackageReference Include="Coject.Core.Logging" Version="1.3.0" />
  <PackageReference Include="Coject.Core.Logging.AspNetCore" Version="1.1.0" />
</ItemGroup>

These are generated-artifact dependencies: Contracts supplies the explicit event/action, transport-shape, and authentication contracts; Core supplies the custom-procedure descriptor and telemetry runtime; and AspNetCore supplies the controller base classes. They are not a request to make Coject.Workshop.Metadata depend on runtime packages. Workshop Metadata remains the separate ASP.NET-independent generation-time package.

Generated controller base classes

Workshop selects one base class from the explicitly declared CustomProcedureContractShape:

Contract shape Generated base class Transport meaning
ReturnsDataWithoutInput CustomProcedureReturnsDataWithoutInputControllerBase<TResponse> No input; returns data.
ReturnsDataWithInput CustomProcedureReturnsDataWithInputControllerBase<TRequest, TResponse> Accepts input; returns data.
AcceptsInputWithoutData CustomProcedureAcceptsInputWithoutDataControllerBase<TRequest> Accepts input; returns no data.

The three bases classify transport contract shape only. They do not classify business intent, select the event/action pair, select authentication, or represent Single versus Batch item cardinality. Those decisions remain explicit metadata/descriptor fields.

Explicit business event/action policy

The generated descriptor carries an explicitly declared Contracts event/action policy and Core procedure intent. Event and action are not inferred from procedure names, controller names, routes, HTTP verbs, CLR request/response types, or result counts. For example, a procedure named DeleteReport, a DELETE route, or a single-item result does not by itself select DataDeletion/Delete.

Declare the pair in Workshop metadata, such as DataRead/Read, DataCreation/Create, or DataModification/Execute; the metadata and descriptor validators then check compatibility with the declared intent and execution shape. Single/Batch is item cardinality, not a transport contract-shape decision.

Anonymous and authenticated procedures

CustomProcedureAuthenticationMode is explicit:

  • Anonymous means no authorizer and no user ID are required. The adapter skips its authorizer hook for that descriptor. Workshop-generated metadata must omit userId, and no synthetic identity is created.
  • AuthenticatedUser is the authenticated-caller mode. When the host provides ICustomProcedureAuthorizer<TRequest>, the adapter invokes it and maps its safe result to allowed, unauthorized, or forbidden execution. An explicit bounded userId may be carried as metadata, but it is never inferred from names, routes, HTTP context values, CLR types, or result counts.

Aligned package versions

Use the following versions when Workshop generation and ASP.NET Core runtime execution are consumed together:

Package Version Role
Coject.Core.Logging.Contracts 3.1.0 Provider-neutral event/action, transport-shape, and authentication contracts.
Coject.Core.Logging 1.3.0 Core custom-procedure descriptors and telemetry runtime.
Coject.Core.Logging.AspNetCore 1.1.0 ASP.NET Core execution seam and generated controller bases.
Coject.Workshop.Metadata 1.2.0 ASP.NET-independent metadata and source generation.
Coject.Workshop.Metadata.Mapping 1.2.0 Optional provider-neutral mapping/mutation-outcome companion.

The Workshop and Mapping packages are not dependencies of this ASP.NET Core package merely because their generated or mapped output is consumed by an application.

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
1.2.0 31 9/13/2026
1.1.0 47 9/13/2026

Coject Core Logging ASP.NET Core v1.2.0 adds generic lifecycle safety, explicit single/batch executor seams, and redacted failure metadata for custom procedures.