public Task <ICollection <string> > RetrieveBehaviorQualifierReferenceIdsAsync(string cr_reference_id, string behavior_qualifier, string collection_filter = null) { return(Task.Run <ICollection <string> >(() => { if (behavior_qualifier?.ToLower() != "withdrawal") { return new List <string>(); } var loanId = ParseGuid(cr_reference_id, "cr_reference_id"); var records = _cdsWebApi.RetrieveMultiple("msfsi_syndicateses", $@"<fetch> <entity name='msfsi_syndicates'> <attribute name='msfsi_syndicatesid' /> <filter> <condition attribute='msfsi_loanid' operator='eq' value='{loanId}' /> <condition attribute='msfsi_name' operator='like' value='Withdrawal -%' /> </filter> </entity> </fetch>"); return records.SelectMany(record => record.Attributes .Where(attribute => attribute.Key == "msfsi_syndicatesid") .Select(attribute => attribute.Value?.ToString())).ToList(); })); }
public Task <ICollection <string> > RetrieveCollateralAssetAdministrationReferenceIdsAsync(string collection_filter = null) { return(Task.Run <ICollection <string> >(() => { var records = _cdsWebApi.RetrieveMultiple("msfsi_collaterals", @"<fetch> <entity name='msfsi_collateral'> <attribute name='msfsi_collateralid' /> </entity> </fetch>"); return records.SelectMany(record => record.Attributes .Where(attribute => attribute.Key == "msfsi_collateralid") .Select(attribute => attribute.Value?.ToString())).ToList(); })); }