public CardController() { productDetailContext = new ProductDetailContext(); cdc = new CartDetailContext(); pdb = new ProductDetailDB(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <ProductDetail, ProductDetailDTO>(); }); var conf = new MapperConfiguration(cfg => { cfg.CreateMap <ViewCartDTO, ViewCartModel>(); }); productmapper = new Mapper(config); cartMapper = new Mapper(conf); }
public CategoryController() { productDetailContext = new ProductDetailContext(); categoryDetailContext = new CategoryDetailContext(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <ProductDetail, ProductDetailDTO>(); }); var conf = new MapperConfiguration(cfg => { cfg.CreateMap <CategoryDTO, CategoryModel>(); }); var conf1 = new MapperConfiguration(cfg => { cfg.CreateMap <ProductSearchResultDTO, ProductsSearchViewModel>(); }); productmapper = new Mapper(config); catMapper = new Mapper(conf); ProductsSearchResultVMMapper = new Mapper(conf1); }
public ProductDetailController(ProductDetailContext context) { _context = context; }
public CategoryController(ProductDetailContext context) { _context = context; }