コード例 #1
0
        /// <summary>
        /// Factory method that creates a new IBetweenPredicate predicate.
        /// </summary>
        public static IBetweenPredicate Between <T>(Expression <Func <T, object> > expression, BetweenValues values, bool not = false)
            where T : class
        {
            PropertyInfo propertyInfo = ReflectionHelper.GetProperty(expression) as PropertyInfo;

            return(new BetweenPredicate <T>
            {
                Not = not,
                PropertyName = propertyInfo.Name,
                Value = values
            });
        }
コード例 #2
0
ファイル: Predicates.cs プロジェクト: leeolevis/ezCms
        /// <summary>
        /// Factory method that creates a new IBetweenPredicate predicate.
        /// </summary>
        public static IBetweenPredicate Between <T>(Expression <Func <T, object> > expression, BetweenValues values, string tableName = null, string schemaName = null, bool not = false)
            where T : class
        {
            var propertyInfo = ReflectionHelper.GetProperty(expression) as PropertyInfo;

            return(new BetweenPredicate <T>
            {
                Not = not,
                PropertyName = propertyInfo.Name,
                Value = values,
                SchemaName = schemaName,
                TableName = tableName
            });
        }