public async Task <IActionResult> Create([Bind("Id,Country,Recommendation")] LocationModel locationModel) { if (ModelState.IsValid) { _context.Add(locationModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(locationModel)); }
public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,Username,Email,Password")] UserModel userModel) { if (ModelState.IsValid) { _context.Add(userModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(userModel)); }
public async Task <IActionResult> Signup(UserModel user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(Redirect("Login")); } return(View(user)); }