Ejemplo n.º 1
0
        public ClassLevelViewModel UpdateClassLevel(int id, ClassLevelViewModel classLevel)
        {
            var originalClassLevel = _classProgressionRepository.GetById(id);

            ClassLevelMapper.MapModelToEntity(classLevel, originalClassLevel);
            originalClassLevel.ModifiedBy = "TEST";
            var updatedClassLevel = _classProgressionRepository.Update(originalClassLevel);

            return(ClassLevelMapper.MapEntityToModel(updatedClassLevel));
        }
Ejemplo n.º 2
0
        public ClassLevelViewModel AddClassLevel(ClassLevelViewModel classLevel)
        {
            var classLevelEntity = ClassLevelMapper.MapModelToEntity(classLevel);

            classLevelEntity.CreatedBy = "TEST";
            classLevelEntity.SeedData  = false;
            var addedClassLevel = _classProgressionRepository.Add(classLevelEntity);

            return(ClassLevelMapper.MapEntityToModel(addedClassLevel));
        }