public ActionResult GetSubEventDetails(string sessionId, string startDate) { string Model = string.Concat("{sessionId:", sessionId, "startDate:", startDate, "}"); LogHelper.InsertServiceLogs("search/sessionId/subevent/startDate (GetSubEventDetails)", Model); //var events = FeedHelper.GetSubEventDetailsBySessionIdDynamically(sessionId?.Split('-')[0], startDate, sessionId?.Split('-')[1]); var events = FeedHelper.GetSubEventDetailsBySessionIdDynamically(sessionId?.Substring(sessionId.IndexOf("-") + 1).Trim(), startDate, sessionId?.Substring(0, sessionId.IndexOf("-")).Trim()); return(Ok(events)); }