I have a new_Term object with the attributes new_StartDate and new_EndDate. I really want to write this statement in a single query expression:
new_StartDate <= DateTime.UtcNow <= new_EndDate
My first idea would be to use Inter ConditionOperator, but only one attribute works between statements, i.e.
// Not valid because the first parameter expects a string attribute name, not a value new ConditionExpression(DateTime.UtcNow.Date, ConditionOperator.Between, "new_startdate", "new_enddate")
Besides the obvious two condition expressions, is there a way to do this in a single condition expression?
new ConditionExpression("new_startdate", ConditionOperator.LessEqual, DateTime.UtcNow); new ConditionExpression("new_enddate", ConditionOperator.GreaterEqual, DateTime.UtcNow);
Daryl source share