@using Microsoft.AspNetCore.Http @using Microsoft.AspNetCore.Http.Extensions; @model Groceries.Data.Store @{ ViewBag.Title = "Edit Store"; var returnUrl = Url.Action("Index", new { page = 1 }); if (Context.Request.GetTypedHeaders().Referer is Uri referer && referer.Host == Context.Request.Host.Host) { var requestUrl = new UriBuilder { Scheme = Context.Request.Scheme, Host = Context.Request.Host.Host, Port = Context.Request.Host.Port.GetValueOrDefault(-1), Path = Context.Request.Path.ToString(), Query = Context.Request.QueryString.ToString(), }.Uri; if (referer != requestUrl) { returnUrl = referer.PathAndQuery; } } }

Edit Store

Cancel