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.

34 lines
776 B

using API.Dto;
using Model;
namespace API.Mapping
{
public static class SkillMapper
{
public static SkillDto ToDto(this Skill skill)
{
if (skill == null)
{
throw new ArgumentNullException("Skill null");
}
return new SkillDto()
{
Name = skill.Name,
Description = skill.Description,
Type = skill.Type
};
}
public static Skill ToSkill(this SkillDto skillDto)
{
if (skillDto == null)
{
throw new ArgumentNullException("SkinDto null");
}
return new Skill(skillDto.Name, skillDto.Type, skillDto.Description);
}
}
}