GetQuery( StashClient <KeyDataWithList> stashClient, string partitionKey, string rowKey) { if (partitionKey.Is() && RowKey.Is()) { return(stashClient.CreateQuery() .Where(t => t.PartitionKey == partitionKey && t.RowKey == rowKey)); } else if (partitionKey.Is()) { return(stashClient.CreateQuery() .Where(t => t.PartitionKey == partitionKey)); } else if (rowKey.Is()) { return(stashClient.CreateQuery() .Where(t => t.RowKey == rowKey)); } else { return(stashClient.CreateQuery()); } }