public IEnumerable <ManagerViewModel> GetManagers() { var config = new MapperConfiguration(cfg => { cfg.CreateMap <ManagerDTO, ManagerViewModel>(); }); IMapper mapper = config.CreateMapper(); return(mapper.Map <IEnumerable <ManagerDTO>, List <ManagerViewModel> >(_dbConnect.GetManagers())); }