public bool ValidSession(SearchData SD) { try { SessionRepo sessionRepo = new SessionRepo(); return(sessionRepo.ChechSessionStatus(SD)); } catch (Exception ex) { LoggingHelper.WriteToFile("SessionManager/Errors/", "CreateSession_" + SD.sID, ex.InnerException?.Message, ex.Message + " Sourse :" + ex.Source + " Stack Trace :" + ex.StackTrace); return(false); } }