コード例 #1
0
        // GET: Admin/Cart
        public ActionResult Category()
        {
            // List<CategoryViewModel> catagoryList;
            List <Category>   categories;
            CategoryViewModel fetchedData = null;
            var      config        = new MapperConfiguration(cfg => { cfg.CreateMap <CategoryViewModel, Category>(); });
            IMapper  mapper        = config.CreateMapper();
            Category sensitiveData = mapper.Map <CategoryViewModel, Category>(fetchedData);

            categories = shopBL.Category();

            return(View(categories));
        }