public async Task <IActionResult> Create([Bind("Id,Number,FormName,Code,Title,Status")] CustomForm customForm) { if (ModelState.IsValid) { _context.Add(customForm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customForm)); }
public async Task <IActionResult> Create([Bind("Id,Name,Phone,Email,Address,Role")] User user) { user.Role = Constants.Client; if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }