Dynamic+linq编译错误我先声明,我在动态数据上用linq做了一些非常可怕的事情。但我无法弄清楚为什么此查询无法编译:错误1??属性'h__TransparentIdentifier0'不能与类型参数一起使用publicclass{publicstaticvoidMain(string[]args){vardocs=newdynamic[0];varq=fromdocindocsdoc["@metadata"]["Raven-Entity-Name"]=="Cases"doc.AssociatedEntities!=nullfromentitiesindoc.AssociatedEntitieswhereentity.Tags!=null//这里的编译器错误来自entity.Tags中的标签wheretag.ReferencedAggregate!=nullselectnew{tag.ReferencedAggregate.Id,doc.__document_id};}}publicstaticclassLinqOnDynamic{privatestaticIEnumerableselect(thisobjectisself){if(self==null)yieldbreakout;if(selfisIEnumerable==false||selfisstring)thrownewInvalidOperationException("Attempttoenumerate"+self.GetType().姓名);foreach(((IEnumerable)self中的变量项目)){收益率项目;}}publicstaticIEnumerableSelectMany(此对象来源,FunccollectionSelector,FuncresultSelector){returnEnumerable.SelectMany(Select(source),collectionSelector,resultSelector);}publicstaticIEnumerableSelectMany(此对象源,FunccollectionSelector,FuncresultSelector){returnEnumerable.SelectMany(Select(source),collectionSelector,resultSelector);}publicstaticIEnumerableSelectMany(thisobjectsource,Func