Skip to content

Sdzeng/Abp.TinyMapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Abp.TinyMapper

Abp.TinyMapper with Abp https://github.com/aspnetboilerplate/aspnetboilerplate. (Not support .net core.)

Nuget downloads GitHub license

Installation

Available on nuget

PM> Install-Package Abp.TinyMapper

Getting Started

In module file

public override void PreInitialize()
{
    Configuration.Modules.AbpTinyMapper().EnableAutoBinding = true;
    Configuration.Modules.AbpTinyMapper().EnablePolymorphicMapping = true;
    Configuration.Modules.AbpTinyMapper().Configurators.Add(() =>
    { 
    //custom your tiny bind
    });
}

Attribute

TinyMapAttribute

TinyMapFromAttribute

TinyMapToAttribute

Map

[TinyMap(typeof(Info))]
public class Dto{
  public int Id{get;set;}
  public string Name{get;set;}
}

public class Info{
  public int Id{get;set;}
  public string Name{get;set;}
}

var dto=new Dto{id=1,Name="Sdzeng"};
var info=dto.MapTo<Info>();
dto=info.MapTo<Dto>();

About

Abp.TinyMapper

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages