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.

38 lines
935 B

using DTO;
using Model;
namespace EntityFramwork.Factories
{
public class Factories
{
public EntityChampions ChampionModelToEntity(Champion champ,int sansSkin = 0)
{
EntityChampions entity = new EntityChampions();
entity.Name = champ.Name;
entity.Bio = champ.Bio;
entity.Icon = champ.Icon;
if ( sansSkin == 0)
{
//entity.Skins = champ.Skins.Select(Model => this.SkinsModelToEntity(Model)).ToList();
}
return entity;
}
public EntitySkins SkinsModelToEntity(Skin skin)
{
EntitySkins entity= new EntitySkins();
entity.Price = skin.Price;
entity.Icon = skin.Icon;
entity.Description= skin.Description;
//entity.Champion = ChampionModelToEntity(skin.Champion,1);
return entity;
}
}
}