Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
nhibernate activerecord linq包含问题_Linq_Nhibernate_Activerecord_Contains - Fatal编程技术网

nhibernate activerecord linq包含问题

nhibernate activerecord linq包含问题,linq,nhibernate,activerecord,contains,Linq,Nhibernate,Activerecord,Contains,我在Castle ActiveRecord 2.12中遇到以下查询问题: var q = from o in SodisceFMClientVAR.Queryable where taxnos2.Contains(o.TaxFileNo) select o; taxNos2是一个字符串数组 运行时,我得到一个异常: + InnerException{“索引超出范围 范围。必须为非负且小于 比这个房间的大小还大 集合。\r\n参数名称: 索引“}系统异常 {Sys

我在Castle ActiveRecord 2.12中遇到以下查询问题:

var q = from o in SodisceFMClientVAR.Queryable
        where taxnos2.Contains(o.TaxFileNo)
        select o;
taxNos2是一个字符串数组

运行时,我得到一个异常: +

InnerException{“索引超出范围 范围。必须为非负且小于 比这个房间的大小还大 集合。\r\n参数名称: 索引“}系统异常 {System.ArgumentOutOfRangeException}

  StackTrace  "   at
Castle.ActiveRecord.ActiveRecordBase.ExecuteQuery(IActiveRecordQuery 查询)\r\n位于 Castle.ActiveRecord.Linq.LinqResultWrapper
1.Populate()\r\n
在
Castle.ActiveRecord.Linq.LinqResultWrapper
1.GetEnumerator()\r\n 在 NHibernate.Linq.Query
1.GetEnumerator()\r\n
在
系统Linq缓冲区
1..ctor(IEnumerable
1
源)\r\n位于
System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 源)\r\n位于 prosoft.skb.insolventnostDataAccess.insolventnostdataacar.GetOurUsersListLS(ICollection
1
分类群
C:\\svn\\skb\\insolventnostWithAR\\prosoft.skb.insolventnostDataAccess\\InsolventnostDataAR.cs:line
214\r\n在
prosoft.skb.UnsolventNostDataFromWS.UnsolventNostFromWS.FilterByUsers(IEnumerable
1 odprtiPostopki)在 C:\svn\skb\inslventnostwithar\prosoft.skb.inslventnostdatafromws\inslventnostfromws.cs:line 237\r\n在 prosoft.skb.insolventnostDataFromWS.InsolventnostFromWS.SyncData()文件 在里面 C:\svn\skb\inslventnostwithar\prosoft.skb.inslventnostdatafromws\inslventnostfromws.cs:line 53英寸字符串

包含甚至在linq中为nhibernate工作吗?我在谷歌上找不到任何东西。。。 有解决办法吗


谢谢!

好吧,我想出来了-问题实际上是在类映射到表时,DateTime字段必须是DateTime?字段


虽然出现了奇怪的错误…

我对Castle ActiveRecord一无所知,但我知道Contains()在LINQ-to-NHibernate中工作。如何映射taxnos2?能否显示映射属性?