public ActionResult Details(long id)
        {
            devuserEntities DevUserObj = new devuserEntities();
            Product         product    = DevUserObj.Products.Where(temp => temp.ProductID == id).FirstOrDefault();

            return(View(product));
        }
        // GET: Brands
        public ActionResult Index()
        {
            devuserEntities DevUserObj = new devuserEntities();
            List <Brand>    brands     = DevUserObj.Brands.ToList();

            return(View(brands));
        }
예제 #3
0
        // GET: Categories
        public ActionResult Index()
        {
            devuserEntities DevUserObj = new devuserEntities();
            List <Category> category   = DevUserObj.Categories.ToList();

            return(View(category));
        }
        public ActionResult Create(Product products)
        {
            devuserEntities DevUserObj = new devuserEntities();

            DevUserObj.Products.Add(products);
            DevUserObj.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public ActionResult Index(string Search = "")
        {
            devuserEntities DevUserObj = new devuserEntities();

            ViewBag.Search = Search;
            List <Product> product = DevUserObj.Products.Where(temp => temp.ProductName.Contains(Search)).ToList();

            return(View(product));
        }