示例#1
0
文件: PL.cs 项目: KudrinAV/Task5
        public bool CreateSale(SaleViewModel sale)
        {
            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <SaleViewModel, SaleDTO>();
            });
            IMapper mapper = config.CreateMapper();

            return(_dbConnect.CreateSale(mapper.Map <SaleViewModel, SaleDTO>(sale)));
        }