//[ValidateAntiForgeryToken] public async Task <IActionResult> Create([Bind("Id,Username,Email,Firstname,Lastname,ProfilePicture,Status")] Player playerModel) { if (ModelState.IsValid) { _context.Add(playerModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(playerModel)); }
public async Task <IActionResult> Create([Bind("Id,Line1,Line2,City,state,ZipCode")] Address addressModel) { if (ModelState.IsValid) { _context.Add(addressModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(addressModel)); }
public async Task <IActionResult> Create( [Bind("Id,Username,Email,Firstname,Lastname,Status")] UserModel userModel) { if (ModelState.IsValid) { _context.Add(userModel); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(userModel)); }