我使用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+"))