You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
758 B
27 lines
758 B
using DTO;
|
|
using Model;
|
|
|
|
namespace APILOL.Mapper
|
|
{
|
|
public static class ChampionMapper
|
|
{
|
|
public static ChampionDTO ToDto(this Champion champion)
|
|
{
|
|
return new ChampionDTO()
|
|
{
|
|
Name = champion.Name,
|
|
Bio = champion.Bio,
|
|
Class = champion.Class,
|
|
Icon = champion.Icon,
|
|
Image = champion.Image,
|
|
Characteristics = champion.Characteristics,
|
|
Skills = champion.Skills,
|
|
};
|
|
}
|
|
|
|
public static Champion ToModel(this ChampionDTO champion)
|
|
{
|
|
return new Champion(champion.Name , champion.Class, champion.Icon, champion.Image.ToString(), champion.Bio);
|
|
}
|
|
}
|
|
} |