Skip to content

bauer-group/LIB-Shared-Business-Models-NET

Repository files navigation

BAUER GROUP — Shared Business Models

Release & Publish NuGet Downloads .NET License: MIT

Cross-platform POCO domain models for the BAUER GROUP Shared Business ecosystem: a dependency-free base package plus a family of domain satellites, all multi-targeted for net10.0 · net8.0 · netstandard2.0.

The netstandard2.0 leg keeps the models consumable from .NET Framework 4.6.2+, Unity, Xamarin and other legacy hosts; modern C# language features (init accessors, required members) are backfilled there via PolySharp.

Packages

Package NuGet Depends on
BAUERGROUP.Shared.Business.Models NuGet none (base)
BAUERGROUP.Shared.Business.Models.Shipping NuGet Core
BAUERGROUP.Shared.Business.Models.ERP NuGet Models · Shipping · Core
BAUERGROUP.Shared.Business.Models.CRM NuGet Models
BAUERGROUP.Shared.Business.Models.DMS NuGet Models

The base package is strictly 0-dependency. Domain satellites may layer on BAUERGROUP.Shared.Core for shared primitives (e.g. IndependentImage).

Install

dotnet add package BAUERGROUP.Shared.Business.Models
# domain satellites, as needed:
dotnet add package BAUERGROUP.Shared.Business.Models.Shipping
dotnet add package BAUERGROUP.Shared.Business.Models.ERP

Quick start

using BAUERGROUP.Shared.Business.Models;

public sealed class Customer : BusinessObject
{
    public Customer() { }                       // UID auto-generated
    public Customer(Guid gUID) : base(gUID) { } // re-hydrate with a known identity

    public required string Name { get; init; }
}

var c = new Customer { Name = "Contoso" };
// c.UID     -> a fresh Guid (init-only); pass an explicit one via the ctor or initializer
// c.Changed -> DateTime.UtcNow at construction, mutable on update

Deep clone

Models are deep-cloned via the BAUERGROUP.Shared.Core JSON helper:

using BAUERGROUP.Shared.Core.Extensions;

var copy = original.Clone();   // safe System.Text.Json deep copy

Cloning/serialization requires the type to round-trip through System.Text.Json (a public parameterless constructor or [JsonConstructor]). A few legacy ERP value types don't yet — see the migration guide.

Documentation

License

MIT © BAUER GROUP

About

POCO domain models for the BAUER GROUP Shared Business ecosystem.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages