The scope of this library is to have something that I use in all my projects. I don't want to copy it on any new project, so I decided to put it on NuGet.
If you like it, feel free to use it, otherwise if it hurts you because you don't like to have MapTo<>()
extension method of the type object
feel free to ignore this library without stress me :)
Moreover, if you think it is useful and you want to add some features, send your amazing PR.
First, install NuGet. Then, install AutoMapper.Extensions from the package manager console:
PM> Install-Package AutoMapper.Extensions
var myInstance = new User();
myInstance.Firstname = "Ugo";
myInstance.Lastname = "Lattanzi";
myInstance.Email = "imperugo@gmail.com";
var myDto = myInstance.MapTo<UserDto>();
var myInstance = new User();
myInstance.Firstname = "Ugo";
myInstance.Lastname = "Lattanzi";
myInstance.Email = "imperugo@gmail.com";
var myDto = new UserDto();
myInstance.MapToInstance(myDto);
var myList = new List<User>();
myList.Add(new User(){
Firstname = "Ugo",
Lastname = "Lattanzi",
Email = "imperugo@gmail.com"
});
myList.Add(new User(){
Firstname = "Mario",
Lastname = "Rossi",
Email = "xxx@yyy.com"
});
var myDtoList = myList.MapTo<UserDto>();
Finally I've added some converts for:
DateTimeOffset => DateTime
Uri => String
You don't know what a Converter is? No worries, take a look here
Getting started with Git and GitHub
- Setting up Git for Windows and connecting to GitHub
- Forking a GitHub repository
- The simple guide to GIT guide
- Open an issue if you encounter a bug or have a suggestion for improvements/features
Once you're familiar with Git and GitHub, clone the repository and start contributing.