public IEnumerable <SchoolClassViewModel> GetSchoolClass() { var map = new MapperConfiguration(cfg => cfg.CreateMap <SchoolClassDTO, SchoolClassViewModel>()).CreateMapper(); return(map.Map <IEnumerable <SchoolClassDTO>, IEnumerable <SchoolClassViewModel> >(serviceCreator.schoolClassService().GetAll())); }