public MonsterViewModel AddMonster(MonsterViewModel monster)
        {
            var monsterToAdd = MonsterMapper.MapModelToEntity(monster);

            monsterToAdd.CreatedBy = "Test";
            monsterToAdd.SeedData  = false;
            var addedMonster = _monsterRepository.Add(monsterToAdd);

            return(MonsterMapper.MapEntityToModel(addedMonster));
        }
        public MonsterViewModel UpdateMonster(int id, MonsterViewModel monster)
        {
            var originalMonster = _monsterRepository.GetById(id);

            MonsterMapper.MapModelToEntity(monster, originalMonster);
            originalMonster.ModifiedBy = "UpdateMonster";
            var updatedMonster = _monsterRepository.Update(originalMonster);

            return(MonsterMapper.MapEntityToModel(updatedMonster));
        }
 public MonsterViewModel GetMonsterById(int id)
 {
     return(MonsterMapper.MapEntityToModel(_monsterRepository.GetById(id)));
 }