IntegratoR.Hosting 1.3.5

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

IntegratoR

.NET framework for building integrations with Microsoft Dynamics 365 Finance & Operations via OData on Azure Functions.

Build & Validate License: MIT .NET

Quick Start

Install the hosting package and register all services with a single call:

dotnet add package IntegratoR.Hosting
var host = new HostBuilder()
    .ConfigureFunctionsWebApplication()
    .ConfigureServices((context, services) =>
    {
        services.AddIntegratoR(context.Configuration, builder =>
        {
            builder.AddConsumerHandlers(Assembly.GetExecutingAssembly());
        });
    })
    .Build();

Add your D365 connection settings:

{
  "ODataSettings": {
    "Url": "https://your-environment.operations.dynamics.com/data",
    "Authentication": {
      "Mode": "OAuth",
      "OAuth": {
        "ClientId": "<app-registration-id>",
        "ClientSecret": "<client-secret>",
        "TenantId": "<tenant-id>",
        "Resource": "https://your-environment.operations.dynamics.com"
      }
    }
  }
}

See Configure OData for all available settings (timeouts, retries, circuit breaker, local metadata).

Send a command to create a journal header:

// injected via constructor: IMediator mediator

var header = new LedgerJournalHeader
{
    DataAreaId = "ps",
    JournalName = "GenJrn",
    Description = "Monthly accruals"
};

Result<LedgerJournalHeader> result = await mediator.Send(
    new CreateCommand<LedgerJournalHeader>(header),
    cancellationToken).ConfigureAwait(false);

if (result.IsSuccess)
{
    string batchNumber = result.Value.JournalBatchNumber!;
}

Every operation returns a Result<T> -- no exceptions for business logic errors. The framework handles OAuth authentication, Polly retry policies, request validation, and structured logging automatically.

Packages

Package Purpose
IntegratoR.Hosting Unified DI registration -- install this one for the full framework
IntegratoR.Abstractions Core interfaces, CQRS contracts, Result pattern, base entities
IntegratoR.Application MediatR pipeline behaviours, generic handlers, OAuth, caching
IntegratoR.OData Generic OData client, resilience policies, field serialization control
IntegratoR.OData.FO D365 F&O entities, feature-specific handlers, financial dimensions
IntegratoR.TestKit Custom Result assertions, fakes, test entity builders

For most projects, add only IntegratoR.Hosting -- it pulls in all other packages as transitive dependencies. Add IntegratoR.TestKit to your test projects.

What It Does

Commands and queries via MediatR with generic handlers for CRUD operations (CreateCommand<T>, UpdateCommand<T>, DeleteCommand<T>) and batch variants. Define your entity class, send a command -- the framework handles serialization, HTTP, and error mapping.

Automatic resilience with Polly policies: exponential backoff retries on transient failures (408, 429, 5xx) and a circuit breaker that stops requests when D365 is unresponsive. All configurable via ODataSettings.

Pipeline behaviours that run on every request in order: logging (structured, with timing), validation (FluentValidation), and caching (opt-in for queries via ICacheableQuery).

Entity serialization control with [ODataField(IgnoreOnCreate = true)] to exclude server-generated fields from POST payloads. The OData service reads these at runtime and builds the correct payload automatically.

Financial dimension support with FinancialDimensionBuilder to construct delimited dimension strings in the segment order D365 F&O expects.

Documentation

Full documentation is in the wiki:

Architecture

IntegratoR.Hosting (composition root)
  -> Application    -> Abstractions (core)
  -> OData          -> Abstractions
  -> OData.FO       -> OData -> Abstractions

Dependencies point inward. Business logic in Abstractions has no external dependencies. The OData and Application layers depend only on Abstractions. Hosting wires everything together.

Development

dotnet build                  # Build the solution
dotnet test                   # Run all tests
dotnet format                 # Format code (.editorconfig enforced)

Prerequisites

  • .NET 10 SDK
  • A D365 F&O environment (for integration testing)

Project Structure

src/
  IntegratoR.Abstractions/    Core interfaces, CQRS contracts, error types
  IntegratoR.Application/     Pipeline behaviours, generic handlers, auth
  IntegratoR.OData/           OData client, Polly policies, field attributes
  IntegratoR.OData.FO/        D365 F&O entities, handlers, dimensions
  IntegratoR.Hosting/         Unified DI registration
tests/
  IntegratoR.TestKit/         Shared test infrastructure
  IntegratoR.*.Tests/         Unit tests per layer

Contributing

See CONTRIBUTING.md for guidelines on submitting issues and pull requests.

License

MIT -- Daniel Dieckmann

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.3.5 79 5/13/2026
1.3.5-ci.1 35 5/13/2026
1.3.4 100 4/15/2026
1.3.4-ci.3 56 4/15/2026
1.3.4-ci.2 60 4/14/2026
1.3.4-ci.1 58 4/14/2026
1.3.3 101 4/13/2026
1.3.3-ci.1 51 4/13/2026
1.3.2 108 4/13/2026
1.3.2-ci.1 51 4/13/2026
1.3.1 94 4/10/2026
1.3.1-ci.1 58 4/10/2026
1.3.0 103 4/1/2026
1.2.1 97 4/1/2026
1.2.1-ci.3 55 4/1/2026
1.2.1-ci.2 57 3/31/2026
1.2.1-ci.1 53 3/31/2026
1.2.0 100 3/31/2026
1.1.1-ci.11 57 3/31/2026
1.1.1-ci.10 64 3/16/2026
Loading failed