public async Task <IActionResult> Create(Center center) { if (ModelState.IsValid) { _context.Add(center); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(center)); }
public async Task <IActionResult> Create([Bind("Id,Email,Password")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }