public async Task <IActionResult> Create([Bind("Id,DeptId,QuestionNo,Point,Comment,DateTime")] Rating rating) { if (ModelState.IsValid) { _context.Add(rating); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(rating)); }
public async Task <IActionResult> Create([Bind("ID,Name,PassCode")] Department department) { if (ModelState.IsValid) { _context.Add(department); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(department)); }