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

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

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

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

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

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

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

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

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

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


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


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


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

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


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

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

            return(queryable);
        }