示例#1
0
        /// <summary>
        /// 数据检索
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        protected override IQueryable <Bsbutton> CreateQueryable(GetBsbuttonPageInput input)
        {
            IQueryable <Bsbutton> queryable = base.CreateQueryable(input);

            queryable = queryable.WhereIf(input.Id != null, t => t.Id == input.Id).AsQueryable();


            queryable = queryable.WhereIf(input.Text != null, t => t.Text == input.Text).AsQueryable();


            queryable = queryable.WhereIf(input.RunEvent != null, t => t.RunEvent == input.RunEvent).AsQueryable();


            queryable = queryable.WhereIf(input.IconClass != null, t => t.IconClass == input.IconClass).AsQueryable();

            queryable = queryable.WhereIf(input.CreationTime.HasValue, t => t.CreationTime == input.CreationTime.Value).AsQueryable();


            queryable = queryable.WhereIf(input.CreatorUserId != null, t => t.CreatorUserId == input.CreatorUserId).AsQueryable();

            queryable = queryable.WhereIf(input.LastModificationTime.HasValue, t => t.LastModificationTime == input.LastModificationTime.Value).AsQueryable();


            queryable = queryable.WhereIf(input.LastModifierUserId != null, t => t.LastModifierUserId == input.LastModifierUserId).AsQueryable();

            return(queryable);
        }
        /// <summary>
        /// 数据检索
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        protected override IQueryable<Bsbutton> CreateQueryable(GetBsbuttonPageInput input)
        {
            IQueryable<Bsbutton> queryable = base.CreateQueryable(input);

            queryable = queryable.WhereIf(input.Id !=null, t => t.Id == input.Id).AsQueryable();

            queryable = queryable.WhereIf(input.Text !=null, t => t.Text == input.Text).AsQueryable();

            queryable = queryable.WhereIf(input.RunEvent !=null, t => t.RunEvent == input.RunEvent).AsQueryable();

            queryable = queryable.WhereIf(input.IconClass !=null, t => t.IconClass == input.IconClass).AsQueryable();

            queryable = queryable.WhereIf(input.CreationTime.HasValue, t => t.CreationTime == input.CreationTime.Value).AsQueryable();

            queryable = queryable.WhereIf(input.CreatorUserId !=null, t => t.CreatorUserId == input.CreatorUserId).AsQueryable();

            queryable = queryable.WhereIf(input.LastModificationTime.HasValue, t => t.LastModificationTime == input.LastModificationTime.Value).AsQueryable();

            queryable = queryable.WhereIf(input.LastModifierUserId !=null, t => t.LastModifierUserId == input.LastModifierUserId).AsQueryable();

            return queryable;
        }