public async Task <IActionResult> Create(AppUser appUser) { if (ModelState.IsValid) { context.Add(appUser); await context.SaveChangesAsync(); TempData["Success"] = "The page has been added!"; return(RedirectToAction("Index")); } return(View(appUser)); }
public async Task <IActionResult> Create(SportsCategory sportsCategory) { if (ModelState.IsValid) { context.Add(sportsCategory); await context.SaveChangesAsync(); TempData["Success"] = "The category has been added!"; return(RedirectToAction("Index")); } return(View(sportsCategory)); }