DateTime GetDateTime(Session session) { DateTime dateTime = new XPQuery <PPOrderLine>(session).Max(line => line.OrderLineDate); return(dateTime.AddDays(-10)); }