コード例 #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
ファイル: 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));
 }