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.
League-of-Legends_Project/EntityFramework_LoL/Sources/EntityMappers/ChampionMapper.cs

27 lines
620 B

using Entities;
using Model;
namespace EntityMapper
{
public static class ChampionMapper {
public static ChampionEntity ToEntity(this Champion item)
{
return new()
{
Name = item.Name,
Bio = item.Bio,
Icon = item.Icon,
Class = item.Class,
Image = new() { Base64 = item.Image.Base64 },
};
}
public static Champion ToModel(this ChampionEntity entity)
{
return new(entity.Name, entity.Class, entity.Icon, "", entity.Bio);
}
}
}