public async Task <IActionResult> Edit(int id, [Bind("Id,Name")] SystemFeedbackCategory systemFeedbackCategory) { if (id != systemFeedbackCategory.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(systemFeedbackCategory); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SystemFeedbackCategoryExists(systemFeedbackCategory.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(systemFeedbackCategory)); }
public async Task <IActionResult> Create([Bind("Id,Name")] SystemFeedbackCategory systemFeedbackCategory) { if (ModelState.IsValid) { _context.Add(systemFeedbackCategory); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(systemFeedbackCategory)); }