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.
21 lines
479 B
21 lines
479 B
using Model;
|
|
|
|
namespace apiLOL.DTO
|
|
{
|
|
public static class ChampionMapper
|
|
{
|
|
public static ChampionDTO ToDTO(this Champion champion)
|
|
=> new ChampionDTO(champion.Name, champion.Bio, champion.Icon);
|
|
|
|
|
|
public static Champion ToModel(this ChampionDTO championDTO)
|
|
{
|
|
Champion champ = new Champion(championDTO.Name);
|
|
champ.Bio = championDTO.Bio;
|
|
champ.Icon = championDTO.Icon;
|
|
return champ;
|
|
}
|
|
|
|
}
|
|
}
|