Generating Hypermedia links in a Web API
问题 I'm curious to know how others have dealt with the issue of generating hypermedia links for their web APIs? Specifically, I'm using ASP.NET Web API, and am torn between having operations return hypermedia-related types, or returning the resource itself, and having the hypermedia stuff happen later in the pipeline. That is, do people tend to do things like: public Resource<Order> GetOrder(int id) { return new Resource<Order>() { Content = new Order(), Links = new LinkCollection<Order>() { new