我在 Castle ActiveRecord 2.12 中遇到以下查询问题:
var q = from o in SodisceFMClientVAR.Queryable
where taxnos2.Contains(o.TaxFileNo)
select o;
taxNos2 是一个字符串数组。
运行时出现异常:+
InnerException {“索引超出范围。必须为非负数且小于集合的大小。\r\n参数名称:索引”} System.Exception {System.ArgumentOutOfRangeException}
StackTrace " at
Castle.ActiveRecord.ActiveRecordBase.ExecuteQuery(IActiveRecordQuery 查询)\r\n 在 Castle.ActiveRecord.Linq.LinqResultWrapper
1.Populate()\r\n at Castle.ActiveRecord.Linq.LinqResultWrapper
1.GetEnumerator()\r\n 在 NHibernate.Linq.Query1.GetEnumerator()\r\n at System.Linq.Buffer
1..ctor(IEnumerable1 source)\r\n at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 源)\r\ n 在 prosoft.skb.insolventnostDataAccess.InsolventnostDataAccAR.GetOurUsersListLS(ICollection1 taxNos) in C:\\svn\\skb\\insolventnostWithAR\\prosoft.skb.insolventnostDataAccess\\InsolventnostDataAR.cs:line 214\r\n at prosoft.skb.insolventnostDataFromWS.InsolventnostFromWS.filterByOurUsers(IEnumerable
1 odprtiPostopki) 在 C:\svn\skb\insolventnostWithAR\prosoft.skb.insolventnostDataFromWS\InsolventnostFromWS.cs:line 237\r\n 在 prosoft.skb.insolventnostDataFromWS.InsolventnostFromWS .SyncData() 在 C:\svn\skb\insolventnostWithAR\prosoft.skb.insolventnostDataFromWS\InsolventnostFromWS.cs:line 53" 字符串
包含甚至在 linq 中为 nhibernate 工作吗?我无法通过谷歌找到任何东西......有解决方法吗?
谢谢!