Guest User

Untitled

a guest
Aug 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. ICriteria Restriction on Expression
  2. DetachedCriteria criteria = DetachedCriteria.For<Order>()
  3. .Add(Restrictions.Eq("Property1 + Property2", confirmation.Ammount));
  4.  
  5. .Add(Expression.Sql("(Property1 + Property2) = ?", confirmation.Ammount, NHibernateUtil.Int32));
  6.  
  7. .Add(Restrictions.Eq(new ArithmeticOperatorProjection(
  8. "+", NHibernateUtil.Int32, Projections.Property("Property1"), Projections.Property("Property2")
  9. )
  10. )
Add Comment
Please, Sign In to add comment