/// <summary> /// 設定會員文章數量Session /// </summary> /// <param name="artCnt">文章數量entity</param> public static void SetArticleCount(UserArticleCount artCnt) { HttpContext.Current.Session["memberArticleCount"] = artCnt; }
/// <summary> /// 會員登入設定Session /// </summary> /// <param name="isAuth">設定登入狀態</param> /// <param name="user">設定登入會員資料</param> /// <param name="artCnt">設定登入會員文章數量</param> public static void UserLogin(bool isAuth, UserViewModel user, UserArticleCount artCnt) { HttpContext.Current.Session["auth"] = isAuth; HttpContext.Current.Session["memberAreaData"] = user; SetArticleCount(artCnt); }