private ResultContract CreateSnapshotResource(SnapshotResourceContract snapshotResourceContract) { var client = m_communicationProvider.GetElasticClient(); var response = client.Index(snapshotResourceContract, idx => idx.Index(SnapshotIndex).Type(SnapshotType)); if (!response.IsValid) { throw new Exception(response.DebugInformation); } return(new ResultContract { Id = response.Id }); }
private void MapToDatabaseMetadata(SnapshotResourceContract snapshotContract, SnapshotMetadataResourceContract metadata) { snapshotContract.Title = metadata.Title; snapshotContract.SubTitle = metadata.SubTitle; snapshotContract.AuthorsLabel = metadata.AuthorsLabel; snapshotContract.RelicAbbreviation = metadata.RelicAbbreviation; snapshotContract.SourceAbbreviation = metadata.SourceAbbreviation; snapshotContract.PublishPlace = metadata.PublishPlace; snapshotContract.PublishDate = metadata.PublishDate; snapshotContract.PublisherText = metadata.PublisherText; snapshotContract.PublisherEmail = metadata.PublisherEmail; snapshotContract.Copyright = metadata.Copyright; snapshotContract.BiblText = metadata.BiblText; snapshotContract.OriginDate = metadata.OriginDate; snapshotContract.NotBefore = metadata.NotBefore; snapshotContract.NotAfter = metadata.NotAfter; snapshotContract.ManuscriptIdno = metadata.ManuscriptIdno; snapshotContract.ManuscriptSettlement = metadata.ManuscriptSettlement; snapshotContract.ManuscriptCountry = metadata.ManuscriptCountry; snapshotContract.ManuscriptRepository = metadata.ManuscriptRepository; snapshotContract.ManuscriptExtent = metadata.ManuscriptExtent; snapshotContract.ManuscriptTitle = metadata.ManuscriptTitle; }