NHibernate WebService IList序列化问题
“/FrameworkServiceTest”应用程序中的服务器错误。
--------------------------------------------------------------------------------
类型 System.Collections.Generic.IList`1[[Model.Entities._Role, Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] 的成员 Model.Entities._Menu._Roles 是接口,因此无法将其序列化。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.NotSupportedException: 类型 System.Collections.Generic.IList`1[[Model.Entities._Role, Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] 的成员 Model.Entities._Menu._Roles 是接口,因此无法将其序列化。
出现这种错误怎么办?
NHibernate中的Bag元素对应的是IList 这个IList型的属性不能序列化怎么办?