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.
LolProject/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkillMapper.cs

24 lines
564 B

using DTO;
using Model;
namespace ApiLol.Mapper
{
public static class SkillMapper
{
public static SkillDto ToDto(this Skill skill)
{
return new SkillDto()
{
Name = skill.Name,
Description = skill.Description,
Type = skill.Type.ToDto()
};
}
public static Skill ToModel(this SkillDto skillDto)
{
return new Skill(skillDto.Name, skillDto.Type.ToModel(), skillDto.Description);
}
}
}