Dosaic.Plugins.Mapping.Mapster 1.0.30

dotnet add package Dosaic.Plugins.Mapping.Mapster --version 1.0.30                
NuGet\Install-Package Dosaic.Plugins.Mapping.Mapster -Version 1.0.30                
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="Dosaic.Plugins.Mapping.Mapster" Version="1.0.30" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dosaic.Plugins.Mapping.Mapster --version 1.0.30                
#r "nuget: Dosaic.Plugins.Mapping.Mapster, 1.0.30"                
#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.
// Install Dosaic.Plugins.Mapping.Mapster as a Cake Addin
#addin nuget:?package=Dosaic.Plugins.Mapping.Mapster&version=1.0.30

// Install Dosaic.Plugins.Mapping.Mapster as a Cake Tool
#tool nuget:?package=Dosaic.Plugins.Mapping.Mapster&version=1.0.30                

Dosaic.Plugins.Mapping.Mapster

Dosaic.Plugins.Mapping.Mapster is a plugin that allows other Dosaic components to use dto mapping using Mapster.

Installation

To install the nuget package follow these steps:

dotnet add package Dosaic.Plugins.Mapping.Mapster

or add as package reference to your .csproj

<PackageReference Include="Dosaic.Plugins.Mapping.Mapster" Version="" />

Appsettings.yml

You do not need to configure anything, because the implementation resolver, does this automatically at startup.

Usage

Currently its only implemented to generate the Mapster mapping rules by the "MapFromAttribute" so you can inline all mappings. If it is needed to do more, we need to implement it.


Example:
```csharp
internal class DbModel {
    public string Id {get;set;}
    public string LongName {get;set;}
}

internal class SomeDto {
    public string Id {get;set;}
    [MapFrom<DbModel>(nameof(DbModel.LongName))]
    public string Name {get;set;}
}

// USAGE:
var dbModel = new DbModel { Id = "1", LongName = "LongName" };
var someDto = dbModel.Adapt<SomeDto>();
Console.WriteLine(someDto.Name); // "LongName"
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. 
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.30 31 1/30/2025
1.0.27 9 1/29/2025
1.0.26 4 1/29/2025
1.0.25 3 1/29/2025