25 lines
765 B
C#
25 lines
765 B
C#
using AutoMapper;
|
|
using PokemonSleepAPI.Models;
|
|
using PokemonSleepAPI.Models.Dto;
|
|
|
|
namespace PokemonSleepAPI
|
|
{
|
|
public class MappingConfig
|
|
{
|
|
public static MapperConfiguration RegisterMaps()
|
|
{
|
|
var mappingConfig = new MapperConfiguration(config =>
|
|
{
|
|
config.CreateMap<PokemonDto, Pokemon>();
|
|
config.CreateMap<Pokemon, PokemonDto>();
|
|
config.CreateMap<PokemonNatureDto, PokemonNature>();
|
|
config.CreateMap<PokemonNature, PokemonNatureDto>();
|
|
config.CreateMap<PokemonSubskillDto, PokemonSubskill>();
|
|
config.CreateMap<PokemonSubskill, PokemonSubskillDto>();
|
|
|
|
});
|
|
return mappingConfig;
|
|
}
|
|
}
|
|
}
|