@model string @inject IHttpContextAccessor HttpContextAccessor @{ ViewBag.Title = "Hello Razor"; string session = HttpContextAccessor.HttpContext.Session.GetString("username"); }
@if (session == null) { @if (Model != null) {

Per poter accedere alla pagina [@Model] e' necessario essere loggati

}
@{ await Html.RenderPartialAsync("Login"); }
@{ await Html.RenderPartialAsync("Register"); }
} else { await Html.RenderPartialAsync("Profile"); // magari sostituire qui }