0

how to pass or send ID's dynamically in id array as batch 10 ID's at a time and serialize and deserialize in C#

{
"custom": {
    "static": {
        "items": [
            {
                "collection": {
                    "id": [ xxxxx,xxxx,xxxx....

                    ]
                }
            }
        ]
    }
},
"output": ["id",
    "status.serial.code",
    "status.serial.date"],
"size": 1000

Expected : 1) Single Json string with dynamic Id's from List or dictionary collection 2) Getting response for each 10 Id's from batch List/Dictionary collection

venkat
  • 5,648
  • 16
  • 58
  • 83
  • Can't you just Take 10 in a loop? Do you need to split the list in chunk of 10? Can't we enumerate it? Btw it's really unclear. [mcve]. – xdtTransform Nov 05 '19 at 07:24
  • https://stackoverflow.com/questions/13731796/create-batches-in-linq , https://stackoverflow.com/questions/419019/split-list-into-sublists-with-linq – xdtTransform Nov 05 '19 at 07:27
  • I've 5000+ `id's` to process and i'm thinking to send batch wise 10 or 15 at a time inorder to reduce load on server without hitting all at a once of 5000+ dynamic id's – venkat Nov 05 '19 at 07:30

0 Answers0