Пример #1
0
        public ActionResult Create()
        {
            ProductManagerViewModel viewModel = new ProductManagerViewModel();

            viewModel.Product           = new Product();
            viewModel.ProductCategories = productCategories.Collection();
            return(View(viewModel));
        }
        // GET: ProductCategoryManager
        public ActionResult Index()
        {
            if (context == null)
            {
                return(View(new List <ProductCategory>()));
            }
            List <ProductCategory> productCategories = context.Collection().ToList();

            return(View(productCategories));
        }
Пример #3
0
        // GET: ProductManager
        public ActionResult Index()
        {
            if (context == null)
            {
                return(View(new List <Product>()));
            }

            return(View(context.Collection().ToList()));
        }
Пример #4
0
        public IActionResult Notes()
        {
            List <Note> notes = noteContext.Collection().OrderByDescending(n => n.CreatedAt).ToList();

            return(View(notes));
        }