Erp.Shared.Contracts 1.1.3

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

Erp.Shared.Contracts

Shared DTOs, interfaces, and contracts for ERP microservices architecture with MassTransit integration support.

Version

Current Version: 1.1.0

Features

  • DataMessage DTO: Generic message structure for cross-service communication
  • IIntegrationEventPublisher: Interface for publishing integration events across microservices
  • IntegrationEventPublisher: MassTransit-based implementation for event publishing
  • Shared DTOs: Common data transfer objects used across multiple services

Installation

dotnet add package Erp.Shared.Contracts --version 1.1.0

Usage

Publishing Integration Events

using Shared.Contracts.Common;
using Microsoft.Extensions.DependencyInjection;

// In your Program.cs or Startup.cs
services.AddScoped<IIntegrationEventPublisher, IntegrationEventPublisher>();

// In your service class
public class MyService
{
    private readonly IIntegrationEventPublisher _publisher;

    public MyService(IIntegrationEventPublisher publisher)
    {
        _publisher = publisher;
    }

    public async Task PublishCompanyCreatedEvent(Company company)
    {
        await _publisher.PublishAsync(
            entityType: "Company",
            operation: "Created",
            payload: new {
                CompanyId = company.Id,
                Name = company.Name
            },
            source: "IdentityService");
    }
}

Using DataMessage

using Shared.Contracts.Common;

var message = new DataMessage
{
    EntityType = "Company",
    Operation = "Created",
    Source = "IdentityService",
    Timestamp = DateTime.UtcNow,
    Data = JsonSerializer.Serialize(payload)
};

What's New in v1.1.0

  • Added IIntegrationEventPublisher interface for standardized event publishing
  • Added IntegrationEventPublisher implementation using MassTransit
  • Generic event publishing support through DataMessage DTO
  • MassTransit dependency for message broker integration

Dependencies

  • .NET 9.0
  • MassTransit 8.2.0
  • Erp.Shared.API: Shared API infrastructure and extensions
  • Erp.Shared.Infrastructure: Shared infrastructure components

License

MIT

Support

For issues and feature requests, please visit the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Erp.Shared.Contracts:

Package Downloads
Erp.Shared.API

Shared API components and extensions for ERP microservices including service registration, middleware, API versioning, and MassTransit integration event publisher registration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.3 305 11/16/2025
1.1.2 275 11/3/2025
1.1.0 189 10/26/2025
1.0.3 158 10/26/2025
1.0.2 297 9/15/2025

v1.1.0:
     - Added IIntegrationEventPublisher interface for cross-service event publishing
     - Added IntegrationEventPublisher implementation using MassTransit
     - Added support for generic event publishing with DataMessage DTO
     - Added MassTransit dependency