public IEnumerable <AssessmentDTO> GetAssessments() { var Assessments = assessmentRepo.FindAll(); List <AssessmentDTO> AssessmentDTOs = new List <AssessmentDTO>(); Mapper.Initialize(c => c.CreateMap <DbSet <Assessment>, List <AssessmentDTO> >()); AssessmentDTOs = Mapper.Map <List <AssessmentDTO> >(Assessments); return(AssessmentDTOs); }