public override int StoreLinkages(IEnumerable <AccountToParty> mappings, LinkageDirection dir) { using (var connection = _sqlTableWithPrimaryKey.NewConnection(connectionString)) { if (dir == LinkageDirection.AccountToParty) { return(new SqlTableSimpleLinkages().InsertOrUpdateLinkageRows(connection, "AccountParty", "AccountId", "PartyId", mappings.Cast <Object>(), (x) => { var t = (AccountToParty)x; return (t.AccountId, t.PartyId); }));
public LoadFromCSV(ClientServicePartitionValidator validator, IClientFactory factory, MyRegistry reg) { this.factory = factory; this.reg = reg; this.validator = validator; dataType = EnumHelper.Parse <DataType>(Helper.Prompt($"Enter type of data - {EnumHelper.ListValues(typeof(DataType))}")); if (dataType == DataType.Party) { partyType = EnumHelper.EnumPrompt <Party.Types.PartyType>(); } if (dataType == DataType.AccountToParty) { linkageDirection = EnumHelper.EnumPrompt <LinkageDirection>(); } }
public IEnumerable <AccountToParty> GetLinkages(IEnumerable <Identifier> source, LinkageDirection direction) { return(client.SendEnumerableListResult <Identifier, AccountToParty>("GetLinkages", AccountToParty.Parser.ParseDelimitedFrom, source, direction)); }
public Int32 StoreLinkages(IEnumerable <AccountToParty> mappings, LinkageDirection direction) { return(client.SendEnumerableIntResult <AccountToParty>("StoreLinkages", mappings, direction)); }
public abstract IEnumerable <AccountToParty> GetLinkages(IEnumerable <Identifier> source, LinkageDirection direction);
public abstract Int32 StoreLinkages(IEnumerable <AccountToParty> mappings, LinkageDirection direction);
public AccountToPartyComparer(LinkageDirection dir) { this.dir = dir; }