예제 #1
0
        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;
        }
예제 #2
0
 public static SessionsLink CreateLink(HttpRequestMessage request, Topic topic)
 {
     return request.ResolveLink<SessionsLink>(TopicSessionsRoute, new { id = topic.Id });
 }
예제 #3
0
 public static TopicLink CreateLink(HttpRequestMessage request, Topic session)
 {
     return request.ResolveLink<TopicLink>(TopicByIdRoute, new { id = session.Id});
 }