SHARE
TWEET

Untitled

a guest Dec 8th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private static List<FolderChildrenDateCreated> GetChildItemsInformation<T>(Guid[] ids, IQueryable<T> childItems)
  2.             where T : Content, IHasParent
  3.         {
  4.             childItems = childItems.Where(p => (ids.Contains(p.Parent.Id)));
  5.  
  6.             return childItems.GroupBy(p => p.Parent.Id).Where(ch => ch.Count() > 0)
  7.                           .Select(chi => new FolderChildrenDateCreated(chi.Key, chi.Max<T, DateTime>(i => i.DateCreated))).ToList();
  8.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top