コード例 #1
0
        public HttpResponseMessage UpdateWikiPageContent(int contentId, WikiContentUpdateRequest request)
        {
            _wikiContentService.UpdateContent(contentId, request);

            ItemResponse <bool> response = new ItemResponse <bool>();

            response.Item = true;

            return(Request.CreateResponse(response));
        }
コード例 #2
0
 public void UpdateContent(int ContentId, WikiContentUpdateRequest request)
 {
     DataProvider.ExecuteNonQuery(GetConnection, "dbo.WikiPageContents_Update"
                                  , inputParamMapper : delegate(SqlParameterCollection paramCollection)
     {
         paramCollection.AddWithValue("@ContentId", ContentId);
         paramCollection.AddWithValue("@PageContent", request.PageContent);
         paramCollection.AddWithValue("@ContentOptions", (request.ContentOptions == null) ? null : JsonConvert.SerializeObject(request.ContentOptions, new KeyValuePairConverter()));
         paramCollection.AddWithValue("@ContentData", (request.ContentData == null) ? null : JsonConvert.SerializeObject(request.ContentData, new KeyValuePairConverter()));
         paramCollection.AddWithValue("@Title", request.Title);
     }, returnParameters : delegate(SqlParameterCollection param)
     {
         //  nope
     });
 }