Og.Nav.Client.Library 1.0.3

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

A lightweight .NET library providing generic OData V4 and SOAP client services for Microsoft Dynamics NAV / Business Central.

Features

  • OData V4 Service: CRUD operations via INavODataService<T> against OData endpoints.
  • SOAP Service: CRUD and codeunit invocation via INavSoapService<T> against SOAP web services.
  • Factory-based DI integration for both service types.
  • Built-in JSON and XML serialization with error handling and extensibility.

Installation

# Install from nuget.org
dotnet add package Og.Nav.Client.Library --version 1.0.3

Usage

// Program.cs
using Core.Interfaces;
using Infrastructure.Services;
using Microsoft.Extensions.Options;

var builder = WebApplication.CreateBuilder(args);

// Configure settings
builder.Services.Configure<NavSoapServiceConfig>(
    builder.Configuration.GetSection("NavSoapService"));
builder.Services.Configure<NavODataServiceConfig>(
    builder.Configuration.GetSection("NavODataService"));

// Register factories
builder.Services.AddSingleton<INavSoapServiceFactory, NavSoapServiceFactory>();
builder.Services.AddSingleton<INavODataServiceFactory, NavODataServiceFactory>();

// Register named HttpClients
builder.Services.AddHttpClient("NavSoapClient", /* ... */);
builder.Services.AddHttpClient("NavODataClient", /* ... */);

Then inject and use:

public class MyAppService
{
    private readonly INavODataService<Customer> _odata;
    private readonly INavSoapService<Order>   _soap;

    public MyAppService(
        INavODataServiceFactory odataFactory,
        INavSoapServiceFactory soapFactory)
    {
        _odata = odataFactory.Create<Customer>("Customers");
        _soap  = soapFactory.Create<Order>("SalesOrder");
    }

    public async Task Run()
    {
        var list   = await _odata.GetEntitiesAsync("Country eq 'US'");
        var single = await _soap.ReadAsync(new XElement("OrderId", "SO-1001"));
    }
}

Configuration

Add to appsettings.json:

"NavSoapService": { /* see docs for fields */ },
"NavODataService": { /* see docs for fields */ }

See Configuration & DI for details.

Contributing

  1. Fork the repo
  2. Create a feature branch
  3. Submit a pull request

License

MIT © job gedions

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.0.3 88 6/28/2025
1.0.2 93 6/28/2025
1.0.1 89 6/28/2025
1.0.0 88 6/28/2025