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.

33 lines
782 B

using DTO;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RelationApi.Factories
{
public static class SkinsFacto
{
public static DtoSkins ModelToDto(this Skin skin)
{
DtoSkins dto = new DtoSkins();
dto.name = skin.Name;
dto.description = skin.Description;
dto.price = skin.Price;
dto.icon = skin.Icon;
dto.image = skin.Image.Base64;
//dto.champion = skin.Champion.ModelToDto();
return dto;
}
public static Skin DtoToModel(this DtoSkins skinDto)
{
return new Skin(skinDto.name, skinDto.champion.DtoToModel());
}
}
}