// [ValidateAntiForgeryToken] public async Task <IActionResult> Create([Bind("ShopId,ShopName,PhoneNumber,WebsiteUrl,City")] Shops shops) { if (ModelState.IsValid) { _context.Add(shops); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(shops)); }
// [ValidateAntiForgeryToken] public async Task <IActionResult> Create([Bind("CustomerId,FullName,UserName,PhoneNumber,EmailAddress")] Customers customers) { if (ModelState.IsValid) { _context.Add(customers); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customers)); }