Пример #1
0
 public CommentViewModel(CommentDto comment, IDataService dataService)
 {
     Comment = comment;
     _dataService = dataService;
 }
Пример #2
0
 public void NewComment(string articleId, CommentDto comment)
 {
     _webClient.Headers[HttpRequestHeader.ContentType] = "application/json";
     try
     {
         _webClient.UploadData("/Article/" + articleId + "/Comment/New", "POST",
                               _serializer.Serialize(new {articleId, commentDto = comment}));
     }
     catch (WebException ex)
     {
         throw new DataServiceException(GetFaultDto(ex));
     }
 }