public async Task <IActionResult> Create([Bind("Id,Name,Birthdate,Email")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Create([Bind("Id,Username,RealName,CreateDate,Level")] SystemUser systemUser) { if (ModelState.IsValid) { _context.Add(systemUser); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(systemUser)); }
public async Task <IActionResult> Create([Bind("Id,CountryCode,AreaCode,Number")] Telephone telephone) { if (ModelState.IsValid) { _context.Add(telephone); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(telephone)); }