public async Task <IActionResult> Create(Location c) { try { if (ModelState.IsValid) { Guid OwnerId = Guid.Parse(_userManager.GetUserId(User)); c = _service.AddLocation(c.LocationName, c.Address, OwnerId); ApplicationUser u = await _userManager.GetUserAsync(User); await _userManager.AddClaimAsync(u, new Claim("Owner", c.LocationID.ToString())); //Need to relog user to refresh admin option await _signInManager.RefreshSignInAsync(u); return(RedirectToAction(nameof(Index))); } Log.Error("Model state invalid For LocationCreation "); return(View()); }catch { return(View()); } }