Skip to content
/ DtoKit Public

A libraries bundle for building, serializing and deserializing objects with interfaces-driven manner

License

Notifications You must be signed in to change notification settings

Leksiqq/DtoKit

Repository files navigation

Net.Leksi.DtoKit

A library for processing of an object as DTO in accordance with the applied interface. Supports partial building and JSON serialization/deserialization.

Prerequisites

  1. Target platform: .NET 6.0
  2. Target CPU: Any

Usage

var builder = WebApplication.CreateBuilder(args);

...

// For interfaces being used as Dto
builder.Services.AddDtoKit(
    provider =>
    {
        provider.AddTransient<ILine, Line>();
        provider.AddTransient<IPort, Port>();
        provider.AddTransient<IVessel, Vessel>();
        provider.AddTransient<IRoute, Route>();
        provider.AddTransient<IShipCall, ShipCall>();
        provider.AddTransient<IVesselForShipCallList, Vessel>();
        provider.AddTransient<IRouteForShipCallList, Route>();
        provider.AddTransient<IShipCallForList, ShipCall>();
        provider.AddTransient<IShipCallAdditionInfo, ShipCall>();
    }
);	

...

var app = builder.Build();

API

See Documentation

About

A libraries bundle for building, serializing and deserializing objects with interfaces-driven manner

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages