public static AppUserModel GetSessionUser(this ISession session) { AppUserModel userModel = new AppUserModel(); userModel = SessionExtension.Get <AppUserModel>(session, "Login"); return(userModel); }
public static string GetSessionUserTokeyKey(this ISession session) { string token = string.Empty; token = SessionExtension.Get <string>(session, "FreeToken"); return(token); }
public void OnActionExecuting(ActionExecutingContext context) { AppUserModel userModel = new AppUserModel(); userModel = SessionExtension.Get <AppUserModel>(context.HttpContext.Session, "Login"); if (userModel == null) { context.Result = new ViewResult { ViewName = "Index", }; } }