public bool ShouldSerializePagination() { // don't serialize the Pagination property, when the list is empty return Pagination != null && Pagination.Count() > 0 }