Пример #1
0
 public IActionResult CreatePublisher([FromBody] PublisherContract request)
 {
     using (var client = GetRestClient())
     {
         var newId = client.CreatePublisher(request);
         return(Json(newId));
     }
 }
Пример #2
0
        public int CreatePublisher(PublisherContract publisher)
        {
            try
            {
                var newId = Post <int>("publisher", publisher);
                return(newId);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", GetCurrentMethod(), e);
                }

                throw;
            }
        }
Пример #3
0
 public CreatePublisherWork(MetadataRepository metadataRepository, PublisherContract data) : base(metadataRepository.UnitOfWork)
 {
     m_metadataRepository = metadataRepository;
     m_data = data;
 }
Пример #4
0
 public int CreatePublisher(PublisherContract data)
 {
     return(new CreatePublisherWork(m_metadataRepository, data).Execute());
 }
Пример #5
0
        public int CreatePublisher([FromBody] PublisherContract publisher)
        {
            var resultId = m_projectMetadataManager.CreatePublisher(publisher);

            return(resultId);
        }