Esempio n. 1
0
        public async Task <ActionResult> Create([Bind(Include = "ProductKey,ProductName,ProductPrice")] Product product)
        {
            if (ModelState.IsValid)
            {
                db.Products.Add(product);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(product));
        }