public ActionResult Get(string afterTimestamp = "", string afterId = "") { long?lafterTimestamp = null, lafterId = null; long lafterTimestampTemp, lafterIdTemp; if (long.TryParse(afterTimestamp, out lafterTimestampTemp)) { lafterTimestamp = lafterTimestampTemp; } if (long.TryParse(afterId, out lafterIdTemp)) { lafterId = lafterIdTemp; } //var sessionContainer = FeedHelper.GetSessions(lafterTimestamp, lafterId); var sessionContainer = FeedHelper.GetSessions_v1(lafterTimestamp, lafterId); if (!string.IsNullOrEmpty(sessionContainer?.Next) && sessionContainer?.Items?.Count <= 0) { if (!sessionContainer.Next.Contains("?")) { if (!string.IsNullOrEmpty(afterTimestamp)) { sessionContainer.Next += "?afterTimestamp=" + afterTimestamp; if (!string.IsNullOrEmpty(afterId)) { sessionContainer.Next += "&afterId=" + afterId; } } } } return(Ok(sessionContainer)); }