Exemplo n.º 1
0
        private void AddFilters(SqlBuilder builder, PagingSpec <TModel> pagingSpec)
        {
            var filters = pagingSpec.FilterExpressions;

            foreach (var filter in filters)
            {
                builder.Where <TModel>(filter);
            }
        }
Exemplo n.º 2
0
        public static SqlBuilder Where <TModel>(this SqlBuilder builder, Expression <Func <TModel, bool> > filter)
        {
            var wb = new WhereBuilder(filter, true, builder.Sequence);

            return(builder.Where(wb.ToString(), wb.Parameters));
        }