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/ApiMapping/RuneMapper.cs

24 lines
595 B

using ApiMapping;
using ApiMapping.enums;
using DTO;
using Model;
namespace ApiMapping
{
public static class RuneMapper
{
public static RuneDto ToDto(this Rune rune)
=> new()
{
Name = rune.Name,
Description = rune.Description,
Family = rune.Family.ToDto(),
Icon = rune.Icon,
Image = rune.Image.ToDto()
};
public static Rune ToModel(this RuneDto rune) => new(rune.Name, rune.Family.ToModel(), rune.Icon, rune.Image.Base64, rune.Description);
}
}