nhibernate hql date functions
- by Russel
Hi
Im writing a notification platform using C# and NHibernate. Im having difficulties with my queries.
I have a Customer entity - which contains a AssessmentCompleted Property. A notification should be sent out 21 months after certification. So my query needs to include all customers where their AssessmentCompletedDate + 21months < currentDate. How do I achieve this? Is there a month add method in nhibernate? I need to add 21 months to each AssessmentCompletedProperty...My query needs to look something like:
SELECT new Notification(c.Id, c.Description, c.AssessmentCompleted + 21
FROM Cusomter c
AND c.AssessmentCompleted + 21 <= :EndDate