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

            return(criteria.SetProjection(Projections.Property(propertyName)));
        }
示例#2
0
 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;
 }
示例#4
0
 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)));
 }