public async Task <IActionResult> Create([Bind("Id,Username,Password")] Login login) { if (ModelState.IsValid) { _context.Add(login); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(login)); }
public async Task <IActionResult> Create([Bind("Journal,ID,FirstName,LastName,BirthDate,PhoneNumber,EmailAddress")] Patient patient) { if (ModelState.IsValid) { _context.Add(patient); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(patient)); }