Пример #1
0
        public int CreateExternalRepository(string configuration, IList <FilteringExpressionContract> filteringExpressionContractList)
        {
            GetOrCreateBookType();
            var filterId = CreateFilter(filteringExpressionContractList);

            m_externalRepositoryId = m_externalRepositoryManager.CreateExternalRepository(new ExternalRepositoryDetailContract
            {
                BibliographicFormat    = GetOrCreateBibliographicFormatContract(),
                Configuration          = configuration,
                Description            = "Desc",
                ExternalRepositoryType = GetOrCreateExternalRepositoryTypeContract(),
                Name                    = "RepoTest" + DateTime.UtcNow,
                Url                     = "test.cz",
                UrlTemplate             = "test.cz/{0}",
                FilteringExpressionSets = new List <FilteringExpressionSetContract> {
                    new FilteringExpressionSetContract {
                        Id = filterId
                    }
                }
            }, GetOrCreateUser());

            return(m_externalRepositoryId);
        }
Пример #2
0
        public int CreateExternalRepository([FromBody] ExternalRepositoryDetailContract data)
        {
            var resultId = m_externalRepositoryManager.CreateExternalRepository(data, m_authenticationManager.GetCurrentUserId());

            return(resultId);
        }