public async Task <ActionResult> Create(HouseholdViewModel vm) { //Create new household Household household = new Household(); //check if name is unique if (househldHelper.IsUnique(household.Name) == true) { household.Name = vm.HouseholdName; } else { TempData["NameNotUnique"] = "The Household name you entered is not unique. Please enter a different name."; return(RedirectToAction("Create")); //bring create household view back up... } // add household to database db.Households.Add(household); db.SaveChanges(); //Add the current user as the first member of the new household var user = db.Users.Find(User.Identity.GetUserId()); household.Members.Add(user); db.SaveChanges(); await ControllerContext.HttpContext.RefreshAuthentication(user); //refresh thier cookies and direct them to their dashboard return(RedirectToAction("Index", "Home")); }