private static dynamic _orderByKey(User obj, UserQuery query) { if (string.IsNullOrEmpty(query.OrderByKey)) return obj.Id; return obj.GetType().GetProperty(query.OrderByKey).GetValue(obj); }