public int UpdateLevelbyId(LevelDTO data) { Level lvl = LevelRequestFormatter.ConvertRespondentInfoFromDTO(data); var response = _unitOfWork.LevelRepository.Update(lvl); _unitOfWork.Save(); return(response); }
public LevelDTO InsertLevel(LevelDTO data) { Level level = LevelRequestFormatter.ConvertRespondentInfoFromDTO(data); _level.LevelId = level.LevelId; _level.LevelName = level.LevelName; _level.LevelOrder = level.LevelOrder; return(LevelRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.LevelRepository.Create(level))); }