Exemplo n.º 1
0
        /// <summary>
        /// 数据检索
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        protected override IQueryable<Bsuser> CreateQueryable(GetBsuserPageInput input)
        {
            IQueryable<Bsuser> queryable = base.CreateQueryable(input);

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

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

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

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

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

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

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

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

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

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

            return queryable;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 数据检索
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        protected override IQueryable <Bsuser> CreateQueryable(GetBsuserPageInput input)
        {
            IQueryable <Bsuser> queryable = base.CreateQueryable(input);

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


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


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


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


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


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


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

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

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


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

            return(queryable);
        }