Skip to content

Instantly share code, notes, and snippets.

@twiernik
Created March 24, 2015 10:29
Show Gist options
  • Select an option

  • Save twiernik/18fd5f25b40897c85deb to your computer and use it in GitHub Desktop.

Select an option

Save twiernik/18fd5f25b40897c85deb to your computer and use it in GitHub Desktop.
var node = new ConditionNode
{
LhsOperand = new PropertyOperand
{
OperandDescription = new PropertyDescription(TypeId.GetTypeId<DateTime>(),
new LocalizableString { ResourceKey = PromotionSharedStrings.ResourceNames.ReportPromotionDateTo },
new NHibernateMetadata
{
FieldName = "rp.DateTo",
RequiredJoins = new string[0],
}),
},
RelationalOperator = new GtOperator<DateTime>
{
Metadata = new OperatorMetadata { Type = RelationalOperatorType.IsGreaterThan, SkipIsLikeAsValueModification = true }
},
RhsOperand = new ConstantOperand { Value = DateTime.Now.AddMonths(-2), OperandDescription = new ConstantDescription(TypeId.GetTypeId<DateTime>()) },
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment