public async Task <IActionResult> Create([Bind("Uic,Serial,SpecialType,RegularType,DateIn")] Request request) { if (ModelState.IsValid) { _context.Add(request); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(request)); }
public async Task <IActionResult> Create([Bind("Dodid,Uic,CommandName,Ao,Email,Phone,Rank,FirstName,MiddleName,LastName")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["Uic"] = new SelectList(_context.Requests, "Uic", "Uic", user.Uic); return(View(user)); }