public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,IsLoggedIn,IsAdmin")] FeatureFlagUser featureFlagUser) { if (id != featureFlagUser.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(featureFlagUser); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FeatureFlagUserExists(featureFlagUser.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(featureFlagUser)); }
public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,IsLoggedIn,IsAdmin")] FeatureFlagUser featureFlagUser) { if (ModelState.IsValid) { _context.Add(featureFlagUser); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(featureFlagUser)); }