public async Task <IActionResult> Create([Bind("Id,Name")] Roles roles) { if (ModelState.IsValid) { _context.Add(roles); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(roles)); }
public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,DateOfBirth,Login")] Users users) { if (ModelState.IsValid) { _context.Add(users); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(users)); }