Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public ProductDetailController(ProductDetailContext context)
 {
     _context = context;
 }
Esempio n. 4
0
 public CategoryController(ProductDetailContext context)
 {
     _context = context;
 }