public static HttpResponseMessage CreateResponse(Topic topicInfo, HttpRequestMessage request) { var response = request.RespondOk(); response.Content = new StringContent(topicInfo.Name); response.Headers.AddLinkHeader(SessionsLinkHelper.CreateLink(request, topicInfo)); response.Headers.AddLinkHeader(SpeakersLinkHelper.CreateLink(request, topicInfo)); return response; }
public static SessionsLink CreateLink(HttpRequestMessage request, Topic topic) { return request.ResolveLink<SessionsLink>(TopicSessionsRoute, new { id = topic.Id }); }
public static TopicLink CreateLink(HttpRequestMessage request, Topic session) { return request.ResolveLink<TopicLink>(TopicByIdRoute, new { id = session.Id}); }