Esempio n. 1
0
        private static List <Core.Resource> FilterResources <T>(
            IQueryable <T> query,
            bool isListRecords) where T : Core.Resource
        {
            List <Core.Resource> listOfResources = new List <Core.Resource>();

            foreach (T resource in query)
            {
                if (resource is ScholarlyWorks.Contact || resource is Identity || resource is Group)
                {
                    continue;
                }
                Core.Resource resourceToAdd = resource;
                listOfResources.Add(resourceToAdd);
            }
            if (isListRecords)
            {
                listOfResources = CoreHelper.LoadResources(listOfResources);
            }
            return(listOfResources);
        }