public IActionResult CreateKeyword(KeywordContract request) { var client = GetCodeListClient(); var newId = client.CreateKeyword(request); return(Json(newId)); }
public IActionResult UpdateKeyword(int keywordId, [FromBody] KeywordContract data) { try { m_catalogValueManager.UpdateKeyword(keywordId, data); return(Ok()); } catch (HttpErrorCodeException exception) { return(StatusCode((int)exception.StatusCode, exception.Message)); } }
public void UpdateKeyword(int keywordId, KeywordContract data) { try { m_client.Put <HttpStatusCode>($"keyword/{keywordId}", data); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public int CreateKeyword(KeywordContract keyword) { try { var newId = m_client.Post <int>("keyword", keyword); return(newId); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public int CreateKeyword([FromBody] KeywordContract data) { var resultId = m_catalogValueManager.CreateKeyword(data.Name); return(resultId); }
public void UpdateKeyword(int keywordId, KeywordContract data) { new CreateOrUpdateKeywordWork(m_catalogValueRepository, keywordId, data.Name).Execute(); }
public void RenameKeyword(int keywordId, KeywordContract request) { var client = GetCodeListClient(); client.UpdateKeyword(keywordId, request); }