Esempio n. 1
0
        public List <SpellViewModel> GetSpellsPreview()
        {
            var entity = _repository.GetAll <Spell>(a => new Spell()
            {
                Id = a.Id, Name = a.Name, Level = a.Level
            }).ToList();

            return(Mapper.Map <List <Spell>, List <SpellViewModel> >(entity));
        }
        public List <EquipmentViewModel> GetEquipments()
        {
            var entities = _dndRepository.GetAll <Equipment>().ToList();

            return(Mapper.Map <List <Equipment>, List <EquipmentViewModel> >(entities));
        }
Esempio n. 3
0
        public List <CharacterViewModel> GetCharacters()
        {
            var characters = _dndRepository.GetAll <Character>().ToList();

            return(Mapper.Map <List <Character>, List <CharacterViewModel> >(characters));
        }