rewrite from foreach loop to list in C# :        public static List<vwStudentExtendedData> GetStudentExtendedData(List<int> studentIds, DateTime? queryDate, int? sectionId)
            {
                var summaries = new List<vwStudentExtendedData>();
                var studentsIDsForSproc = new List<int>();
                foreach (var studentId in studentIds)
                {
    
             
                    var cachedCopy = CacheHelper.GetFromCache<vwStudentExtendedData>(GetStudentSummaryCacheKey(studentId, queryDate, sectionId));
                    if (cachedCopy == null)
                    {
                        studentsIDsForSproc.Add(studentId);
                    }
                    else
                    {
                        summaries.Add(cachedCopy);
                    }
                }
}
Hi, I would like to tune the code, here foreach loop running each and evrytime,i would like to put in list.    
