Beispiel #1
0
        public async Task <IActionResult> Create([Bind("ID,ProductName,ProductDate,Type,Price")] Product product)
        {
            if (ModelState.IsValid)
            {
                _context.Add(product);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(product));
        }