An object to object mapping generator using Roslyn source generators.
$ dotnet add package MappingSourceGeneratorThis project has source generator that allows to generate mappings without any business logic.
| Package | NuGet |
|---|---|
| MappingSourceGenerator |
<PackageReference Include="MappingSourceGenerator" Version="0.1.10" PrivateAssets="all" ExcludeAssets="runtime" />
static partial method marked with MappingSourceGenerator.Markers.GenerateMappingAttribute in static partial class.public static partial class Mapper
{
[GenerateMapping]
public static partial Person2 Map(this Person1 person1);
}
Feel free to create issues for bugs or feature requests. General improvement suggestions (e.g. regarding tests) are appreciated.