public async Task <HttpResponseMessage> GetComments(int topicId) { var replyDataService = new ReplyDataService(); var topicReplies = await replyDataService.GetRepliesByTopicId(topicId); var request = Request.CreateResponse(HttpStatusCode.OK); request.Content = new StringContent( System.Web.Helpers.Json.Encode(topicReplies), Encoding.UTF8, "application/json"); return(request); }
public ReplyController() { this.dataService = new ReplyDataService(); }