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
674 B
27 lines
674 B
using DTO;
|
|
using Model;
|
|
|
|
namespace APILOL.Mapper
|
|
{
|
|
public static class SkinMapper
|
|
{
|
|
public static SkinDTO ToDto(this Skin skin)
|
|
{
|
|
return new SkinDTO()
|
|
{
|
|
Name = skin.Name,
|
|
Description = skin.Description,
|
|
Icon = skin.Icon,
|
|
Price = skin.Price,
|
|
Champion = skin.Champion.ToDto(),
|
|
Image = skin.Image.Base64,
|
|
};
|
|
}
|
|
|
|
public static Skin ToModel(this SkinDTO skin)
|
|
{
|
|
return new Skin(skin.Name, skin.Champion.ToModel(),skin.Price, skin.Image, skin.Icon, skin.Description);
|
|
}
|
|
}
|
|
}
|