Skip to content

bramerdaniel/MagicMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagicMap

SourceGenerator based package for generating boilerplate code like object mappers

This is still under construction

Mapping code from one class to another

public class Person
{
   public string Name { get; set; } 
   public int Age { get; set; } 
}

public class PersonModel
{
   public string Name { get; set; }
   public int Age { get; set; }
}

The required code to write

[TypeMapper(typeof(Person), typeof(PersonModel))]
internal partial class PersonMapper {  }

Usage

var source = new Person { Name = "Peter", Age = 34 };
var model = source.ToPersonModel();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages