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)); }
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)); }