public async Task <IActionResult> Create([Bind("UserId,UserName,Password")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction("Login")); } return(View(user)); }
public async Task <IActionResult> Create([Bind("LocationId,Name,Rating,Address,Description")] Location location) { if (ModelState.IsValid) { _context.Add(location); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(location)); }