Why this method does not sort values from list?
public Paging(IEnumerable<T> values, int start, int limit, string property, string dir) { this.Total = values.Count(); Func<T, string> func = a => a.GetType().GetProperty(property).Name; IEnumerable<T> order = null; if (dir == "DESC") order = values.OrderByDescending(func); else order = values.OrderBy(func); if ((start + limit) > this.Total) limit = this.Total - start; IEnumerable<T> items = (start < 0 || limit < 0) ? order : order.Skip(start).Take(limit); this.AddRange(items); }