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.
22 lines
606 B
22 lines
606 B
using DbManager.Mapper.enums;
|
|
using Model;
|
|
using MyFlib;
|
|
|
|
namespace DbManager.Mapper
|
|
{
|
|
public static class RuneMapper
|
|
{
|
|
public static Rune ToModel(this RuneEntity rune) => new(rune.Name, rune.Family.ToModel(), rune.Icon, rune.Image.Base64, rune.Description);
|
|
public static RuneEntity ToEntity(this Rune rune)
|
|
=> new()
|
|
{
|
|
Name = rune.Name,
|
|
Description = rune.Description,
|
|
Family = rune.Family.ToEntity(),
|
|
Icon = rune.Icon,
|
|
Image = rune.Image.ToEntity()
|
|
};
|
|
|
|
}
|
|
}
|