public async Task <IActionResult> Index(int page = 1) { ViewBag.Title = "Activities"; var dataPage = new WebsessionPage(); try { var user = await UserManager.GetUserAsync(HttpContext.User); var webSession = new WebSession(Configuration, Context, Logger); var dataWeb = webSession.GetWebSessionPage(page, user.Id); if (!string.IsNullOrEmpty(CommonHelper.GetCookie(Request, Const.CookieSessionId))) { foreach (var web in dataWeb.Results) { if (web.Id.Equals(CommonHelper.GetCookie(Request, Const.CookieSessionId))) { web.Current = true; } } } dataPage.Pagination = dataWeb; } catch (Exception e) { Log.Logger.Error("HttpGet SendSms: " + e.Message); ModelState.AddModelError(string.Empty, "Activity"); } return(View(dataPage)); }