Replacing foreach with Select when working with IQueryable<DynamicContentType>