I created a REST API with a preview of the WCF web API, and I want to create a library with the classes that you pass to this API (just to make life easier for .Net developers). These should be simple POCO classes without much functionality.
But on the receiver side, it would be advisable to add some functionality to these classes. The following is an example:
[WebInvoke(UriTemplate = "", Method = "POST")] public Supertext.API.Order Create(Supertext.API.Order apiOrder) {
And this is an example of the POCO class:
public class Order { public string Service { get; set; } public string OrderTitle { get; set; } public string Currency { get; set; } }
Now, what is a good way to extend this class on the server side?
I think using a subclass will not work. Delegates
Actually there are two different versions of the class? One for clients and one for server?
What are other people doing?
source share