public async Task <IActionResult> Create([Bind("ID,name,gender,birthday")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("ID,title,author,click,like_,post_time,letter")] Board board) { if (ModelState.IsValid) { _context.Add(board); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(board)); }