I have an ISession.Queryover code block. In where clause, there is a problem as shown below
var receipts= ISession.QueryOver(() => receipt)
.Where(Restrictions.Le(
Projections.Property(() => receipt.SentDate),
receipt.LastDate),
null) //object references to null
In general I have a table called receipt and I am trying to get datas in case their LastDate is equal to their SentDate. I guess it is because I used same object for comparing.
I need to compare those 2 property which belong to same entity.How can I fix this issue?