コード例 #1
0
        public static IQueryable <Attribute> Sort(this IQueryable <Attribute> source, string orderByQueryString)
        {
            if (string.IsNullOrWhiteSpace(orderByQueryString))
            {
                return(source.OrderBy(e => e.Id));
            }

            var orderQuery = OrderQueryBuilder.CreateOrderQuery <Attribute>(orderByQueryString);

            if (string.IsNullOrWhiteSpace(orderQuery))
            {
                return(source.OrderBy(e => e.Id));
            }

            return(source.OrderBy(orderQuery));
        }
コード例 #2
0
        public static IQueryable <JobApplied> Sort(this IQueryable <JobApplied> source, string orderByQueryString)
        {
            if (string.IsNullOrWhiteSpace(orderByQueryString))
            {
                return(source.OrderBy(e => e.Recruitment.CreatedOn));
            }

            var orderQuery = OrderQueryBuilder.CreateOrderQuery <JobApplied>(orderByQueryString);

            if (string.IsNullOrWhiteSpace(orderQuery))
            {
                return(source.OrderBy(e => e.CreatedOn));
            }

            return(source.OrderBy(orderQuery));
        }