示例#1
0
文件: PL.cs 项目: KudrinAV/Task5
        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()));
        }