У меня есть файл cshtml с следующим кодом
@if (Session.CurrentUser == null)
{
<li>@Html.ActionLink("Register", "Register", "Account")</li>
<li>@Html.ActionLink("Login", "Login", "Account")</li>
}
Объект Session obj происходит из этого класса, который я создал
public class BaseController : Controller
{
protected Services Services { get; private set; }
protected new SessionWrapper Session { get { return SessionWrapper.Instance; } }
protected ConfigWrapper Config { get { return ConfigWrapper.Instance; } }
public BaseController()
{
Services = new Services();
}
}
, поэтому сеанс имеет тип SessionWrapper и имеетСвойство CurrentUser в нем.В моем файле cshtml Session имеет тип HttpSessionStateBase. Как мне изменить тип?Я пытался с SessionWraper.CurrentUser