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
605 B
27 lines
605 B
using DTO;
|
|
using Model;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace Api_lol.Factories
|
|
{
|
|
public static class FactoChampions
|
|
{
|
|
public static Champion DtoToModel(this DtoChampions champDto)
|
|
{
|
|
return new Champion(champDto.name);
|
|
}
|
|
|
|
public static DtoChampions ModelToDto(this Champion champ)
|
|
{
|
|
DtoChampions dto = new DtoChampions();
|
|
|
|
dto.name = champ.Name;
|
|
dto.classe = champ.Class.ToString();
|
|
dto.bio = champ.Bio;
|
|
dto.icon = champ.Icon;
|
|
|
|
return dto;
|
|
}
|
|
}
|
|
}
|