Skip to content

Commit dac823b

Browse files
fixup! Support evaluation of DateTime.Now on db side
Example of breaking change case
1 parent bd97c39 commit dac823b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ from s in db.Shippers
2727
[Test(Description = "This sample uses Count to find the number of Orders placed before yesterday in the database.")]
2828
public void CountWithWhereClause()
2929
{
30-
var q = from o in db.Orders where o.OrderDate <= DateTime.Today.AddDays(-1) select o;
30+
var yesterday = DateTime.Today.AddDays(-1);
31+
var q = from o in db.Orders where o.OrderDate <= yesterday select o;
3132

3233
var count = q.Count();
3334

0 commit comments

Comments
 (0)