public IActionResult CreateAuthor(OriginalAuthorContract request) { var client = GetCodeListClient(); var newId = client.CreateOriginalAuthor(request); return(Json(newId)); }
public IActionResult CreateAuthor([FromBody] OriginalAuthorContract request) { using (var client = GetRestClient()) { var newId = client.CreateOriginalAuthor(request); return(Json(newId)); } }
public IActionResult UpdateOriginalAuthor(int authorId, [FromBody] OriginalAuthorContract author) { try { m_personManager.UpdateOriginalAuthor(authorId, author); return(Ok()); } catch (HttpErrorCodeException exception) { return(StatusCode((int)exception.StatusCode, exception.Message)); } }
public void UpdateOriginalAuthor(int authorId, OriginalAuthorContract data) { try { m_client.Put <HttpStatusCode>($"author/{authorId}", data); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public int CreateOriginalAuthor(OriginalAuthorContract author) { try { var newId = m_client.Post <int>("author", author); return(newId); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public UpdateOriginalAuthorWork(PersonRepository personRepository, int authorId, OriginalAuthorContract data) : base(personRepository) { m_personRepository = personRepository; m_authorId = authorId; m_data = data; }
public int CreateOriginalAuthor(OriginalAuthorContract author) { var resultId = new CreateOriginalAuthorWork(m_personRepository, author).Execute(); return(resultId); }
public void UpdateOriginalAuthor(int authorId, OriginalAuthorContract author) { var updateOriginalAuthorWork = new UpdateOriginalAuthorWork(m_personRepository, authorId, author); updateOriginalAuthorWork.Execute(); }
public void RenameOriginalAuthor(int authorId, OriginalAuthorContract request) { var client = GetCodeListClient(); client.UpdateOriginalAuthor(authorId, request); }
public CreateOriginalAuthorWork(PersonRepository personRepository, OriginalAuthorContract data) : base(personRepository.UnitOfWork) { m_personRepository = personRepository; m_data = data; }
public int CreateOriginalAuthor([FromBody] OriginalAuthorContract author) { return(m_personManager.CreateOriginalAuthor(author)); }