Example #1
0
File: PL.cs Project: 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()));
        }