public async Task <LearningSessionDto> CreateLearningSessionAsync(LearningSessionDto dto) { var learningSession = _learningSessionFactory.CreateLearningSession(dto.SessionName); var learningSessionFromDb = await _learningSessionRepository.SaveAsync(learningSession); var result = _mapper.Map <LearningSessionDto>(learningSessionFromDb); return(result); }
public LearningSession Adapt(LearningSessionDataModel dataModel) => _learningSessionFactory.CreateLearningSession(dataModel.Id, dataModel.SessionName, dataModel.FactIds);