2012-05-25 108 views
-2

我需要将以下查询转换为linq。Nhibernate标准未来转换为linq

IEnumerable<User> data = myquery.Future<User>(); 
IFutureValue<long> count = totalcountQuery.FutureValue<long>(); 

感谢

更新: **

myQuery = session.Query<User>() 
       .Skip(pageIndex * pageSize) 
       .Take(pageSize); 

totalCount = session.Query<User>().LongCount(); 
dbUsers = myQuery.ToFuture(); 
var count = myQuery.LongCount(); 
totalRecords = (int)count.Value; **//Here is the error** 

**

回答

1
IEnumerable<User> data = myquery.ToFuture<User>(); 
IFutureValue<long> count = totalcountQuery.ToFutureValue<long>();