All the parameters for CustomPagination<T> (datasource, page number, page size, and total items count)
I retrieve in the WCF Service. It would be awesome if I could instantiate CustomPagination right there, in WCF and pass it back to my application. However, it looks like it cannot serialize CustomPagination object because it misses attributes like [DataContract]
and [DataMember]
.
I know I could pass back all of the values required for CustomPagination separately or in another custom made object, but it would be a lot nicer to pass back just one ready to use CustomPagination object. Any suggestions on this?
Error that I get when try to update my service reference in my application:
Type 'MvcContrib.Pagination.CustomPagination`1[Myproject.WCFServices.DataContracts.User]' cannot be serialized.
The User object is marked with appropriate [DataContract]
and [DataMember]
attributes.