public static DetachedCriteria SetProjection <T>(this DetachedCriteria criteria, Expression <Func <T, object> > expression)
        {
            var propertyName = expression.ToPropertyName();

            return(criteria.SetProjection(Projections.Property(propertyName)));
        }
 public static string ToPropertyName <T>(this Expression <Func <T, object> > expression)
 {
     return(ReflectionHelper.GetAccessor(expression).ToPropertyName());
 }
 public BitwiseExpression(string propertyName, object value, string @operator, string op)
     : base(new SimpleExpression(propertyName, value, @operator), Expression.Sql("?", value, NHibernateUtil.Enum(value.GetType())))
 {
     Op = op;
 }
 public static string ToPropertyName <T, U>(this Expression <Func <T, U> > property)
 {
     return(ReflectionHelper.GetAccessor(property).ToPropertyName());
 }
 public static BitwiseExpressionBuilder On <T>(Expression <Func <T, object> > property)
 {
     return(new BitwiseExpressionBuilder(Projections.Property(property)));
 }