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.
61 lines
1.5 KiB
61 lines
1.5 KiB
using DTO;
|
|
using Model;
|
|
|
|
namespace EntityFramwork.Factories
|
|
{
|
|
public class Factories
|
|
{
|
|
public EntityChampions ChampionModelToEntity(Champion champ)
|
|
{
|
|
EntityChampions entity = new EntityChampions();
|
|
|
|
entity.Name = champ.Name;
|
|
entity.Bio = champ.Bio;
|
|
entity.Icon = champ.Icon;
|
|
entity.Classe = champ.Class.ToString();
|
|
|
|
return entity;
|
|
}
|
|
|
|
public EntitySkins SkinsModelToEntity(Skin skin,int id)
|
|
{
|
|
EntitySkins entity= new EntitySkins();
|
|
|
|
entity.Price = skin.Price;
|
|
entity.Icon = skin.Icon;
|
|
entity.Name = skin.Name;
|
|
entity.Description = skin.Description;
|
|
entity.ChampionId = id;
|
|
|
|
return entity;
|
|
}
|
|
|
|
|
|
public EntityRunes RuneModelToEntity(Rune rune)
|
|
{
|
|
EntityRunes entity = new EntityRunes();
|
|
|
|
entity.Name= rune.Name;
|
|
entity.Icon= rune.Icon;
|
|
entity.Description = rune.Description;
|
|
entity.Family = rune.Family.ToString();
|
|
|
|
return entity;
|
|
}
|
|
|
|
public EntitySkill SkillModeleToEntity(Skill skill,int championId)
|
|
{
|
|
EntitySkill entity = new EntitySkill();
|
|
|
|
entity.Name = skill.Name;
|
|
entity.Description = skill.Description;
|
|
entity.Type = skill.Type.ToString();
|
|
entity.ChampionId = championId;
|
|
|
|
return entity;
|
|
}
|
|
|
|
|
|
}
|
|
}
|