예제 #1
0
파일: ContactCdc.cs 프로젝트: ostat/Beef
 public async Task LinkIdentifierMappingsAsync(CdcValueIdentifierMappingCollection coll, IStringIdentifierGenerator idGen)
 {
     coll.AddAsync(GlobalId == default, async() => new CdcValueIdentifierMapping {
         Value = this, Property = nameof(GlobalId), Schema = "Legacy", Table = "Address", Key = this.CreateIdentifierMappingKey(), GlobalId = await idGen.GenerateIdentifierAsync <AddressCdc>().ConfigureAwait(false)
     });
     coll.AddAsync(GlobalAlternateAddressId == default && AlternateAddressId != default, async() => new CdcValueIdentifierMapping {
         Value = this, Property = nameof(GlobalAlternateAddressId), Schema = "Legacy", Table = "Address", Key = AlternateAddressId.ToString(), GlobalId = await idGen.GenerateIdentifierAsync <AddressCdc>().ConfigureAwait(false)
     });
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CdcDataOrchestrator{TCdcEntity, TCdcEntityWrapper, TCdcEntityWrapperColl, TCdcTrackingMapper}"/> class that requires identifier mapping support.
 /// </summary>
 /// <param name="db">The <see cref="IDatabase"/>.</param>
 /// <param name="executeStoredProcedureName">The name of the execute outbox stored procedure.</param>
 /// <param name="completeStoredProcedureName">The name of the complete outbox stored procedure.</param>
 /// <param name="eventPublisher">The <see cref="IEventPublisher"/>.</param>
 /// <param name="logger">The <see cref="ILogger"/>.</param>
 /// <param name="identifierMappingStoredProcedureName">The name of the optional identifier mapping stored procedure.</param>
 /// <param name="identifierGenerator">The <see cref="IStringIdentifierGenerator"/>.</param>
 /// <param name="identifierMappingTvp">The <see cref="IIdentifierMappingTvp"/>.</param>
 public CdcDataOrchestrator(IDatabase db, string executeStoredProcedureName, string completeStoredProcedureName, IEventPublisher eventPublisher, ILogger logger, string identifierMappingStoredProcedureName, IStringIdentifierGenerator identifierGenerator, IIdentifierMappingTvp identifierMappingTvp)
     : this(db, executeStoredProcedureName, completeStoredProcedureName, eventPublisher, logger)
 {
     IdentifierMappingStoredProcedureName = Check.NotEmpty(identifierMappingStoredProcedureName, nameof(identifierMappingStoredProcedureName));
     IdentifierGenerator  = Check.NotNull(identifierGenerator, nameof(identifierGenerator));
     IdentifierMappingTvp = Check.NotNull(identifierMappingTvp, nameof(identifierMappingTvp));
 }
예제 #3
0
파일: PersonCdc.cs 프로젝트: ostat/Beef
 public async Task LinkIdentifierMappingsAsync(CdcValueIdentifierMappingCollection coll, IStringIdentifierGenerator idGen)
 {
 }
예제 #4
0
 public ContactCdcData(IDatabase db, IEventPublisher evtPub, ILogger <ContactCdcData> logger, IStringIdentifierGenerator idGen) :
     base(db, "[DemoCdc].[spExecuteContactCdcOutbox]", "[DemoCdc].[spCompleteContactCdcOutbox]", evtPub, logger, "[DemoCdc].[spCreateCdcIdentifierMapping]", idGen, new CdcIdentifierMappingDbMapper()) => ContactCdcDataCtor();
예제 #5
0
파일: PersonCdc.cs 프로젝트: ostat/Beef
 public async Task LinkIdentifierMappingsAsync(CdcValueIdentifierMappingCollection coll, IStringIdentifierGenerator idGen)
 {
     coll.AddAsync(GlobalId == default, async() => new CdcValueIdentifierMapping {
         Value = this, Property = nameof(GlobalId), Schema = "Legacy", Table = "Person", Key = this.CreateIdentifierMappingKey(), GlobalId = await idGen.GenerateIdentifierAsync <PersonCdc>().ConfigureAwait(false)
     });
     Addresses?.ForEach(async item => await item.LinkIdentifierMappingsAsync(coll, idGen).ConfigureAwait(false));
 }