public string GetStreamNameById(int id) { string theStreamName = string.Empty; List <Streams> StreamsList = StreamIntegration.GetStreamList(); List <Streams> strm = (from m in StreamsList where m.StreamID == id select m).ToList(); foreach (Streams s in strm) { theStreamName = s.StreamName; } return(theStreamName); }
//public List<Streams> GetStreamList() //{ // return StreamIntegration.GetStreamList(); //} public List <Streams> GetStreamList() { string Context = this.GetType().FullName.ToString(); try { //return StreamIntegration.GetStreamList(); string UniqueKey = "GetStreamList"; if (HttpRuntime.Cache[UniqueKey] == null) { List <Streams> StreamsList = StreamIntegration.GetStreamList(); HttpRuntime.Cache[UniqueKey] = StreamsList; } return((List <Streams>)(HttpRuntime.Cache[UniqueKey])); } catch (Exception ex) { throw (new Exception(Context, ex)); } }