public async Task <IActionResult> Create([Bind("Id,Name,Country")] Stores stores) { if (ModelState.IsValid) { _context.Add(stores); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(stores)); }
public async Task <IActionResult> Create([Bind("Id,Name,ImageUrl,Price")] Candies candies) { if (ModelState.IsValid) { _context.Add(candies); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(candies)); }