왜 여기가 잘못 되었습니까?세션이 닫혀 있습니다 - 성 ActiveRecord
public IQueryable<Customer> GetAllCustomers()
{
using (SessionScope scope = new SessionScope())
{
return scope.AsQueryable<Customer>();
}
}
var result = from x in GetAllCustomers() select x;
Assert.Greater(result.Count(), 0);
System.ObjectDisposedException : 세션이 종료됩니다! 개체 이름 : 'ISession'
이 게시물이 내게 도움이되지 않았다 : Castle ActiveRecord error "Session is closed"
감사 파블로. 쿼리가 더 이상 사용되지 않을 때를 감지 할 수 있는지 알고 있습니까? – Eduardo