public async Task <IActionResult> Create([Bind("ComplaintId,ComplaintNumber,Picture,Description,Status")] Complaint complaint) { if (ModelState.IsValid) { _context.Add(complaint); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(complaint)); }
public async Task <IActionResult> Create([Bind("UserId,Name,Email,Password,Ssn,PhoneNumber,Address")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }