我使用DateAdd
函数编写了一个SQL查询,需要转换为nhibernate查询
select * from Compliance where (PauseDate is not null and BreachDate > PauseDate and
BreachDate < DateAdd(Hour," +2 +",PauseDate) or (PauseDate is null and BreachDate >
GETDATE() and BreachDate < "+jeopardyTime+"))