public IActionResult CreateLiteraryKind(LiteraryKindContract request) { var client = GetCodeListClient(); var newId = client.CreateLiteraryKind(request); return(Json(newId)); }
public IActionResult CreateLiteraryKind([FromBody] LiteraryKindContract request) { using (var client = GetRestClient()) { var newId = client.CreateLiteraryKind(request); return(Json(newId)); } }
public IActionResult UpdateLiteraryKind(int literaryKindId, [FromBody] LiteraryKindContract data) { try { m_catalogValueManager.UpdateLiteraryKind(literaryKindId, data); return(Ok()); } catch (HttpErrorCodeException exception) { return(StatusCode((int)exception.StatusCode, exception.Message)); } }
public void UpdateLiteraryKind(int literaryKindId, LiteraryKindContract data) { try { m_client.Put <HttpStatusCode>($"literarykind/{literaryKindId}", data); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public int CreateLiteraryKind(LiteraryKindContract literaryKind) { try { var newId = m_client.Post <int>("literarykind", literaryKind); return(newId); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public int CreateLiteraryKind([FromBody] LiteraryKindContract literaryKind) { var resultId = m_catalogValueManager.CreateLiteraryKind(literaryKind.Name); return(resultId); }
public void UpdateLiteraryKind(int literaryKindId, LiteraryKindContract data) { new CreateOrUpdateLiteraryKindWork(m_catalogValueRepository, literaryKindId, data.Name).Execute(); }
public void RenameLiteraryKind(int literaryKindId, LiteraryKindContract request) { var client = GetCodeListClient(); client.UpdateLiteraryKind(literaryKindId, request); }
public int CreateLiteraryKind([FromBody] LiteraryKindContract literaryKind) { var resultId = m_projectMetadataManager.CreateLiteraryKind(literaryKind.Name); return(resultId); }