public CommentViewModel(CommentDto comment, IDataService dataService) { Comment = comment; _dataService = dataService; }
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)); } }