question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Push many items at once

See original GitHub issue

Is there a way to push a collection of items at once, e.g. PostAsync(IEnumerable<Dinosaur>) with online or offline -generated object keys?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cabaumancommented, Aug 5, 2018

This is how I do it:

public async Task Add(IEnumerable<T> items)
{
    await _baseQuery
        .PatchAsync(items.ToDictionary(_ => FirebaseKeyGenerator.Next()))
}

Or use PutAsync if you want to overwrite everything at that node.

0reactions
stale[bot]commented, Oct 9, 2019

Closing the issue due to inactivity. Feel free to re-open

Read more comments on GitHub >

github_iconTop Results From Across the Web

Push multiple elements to array - javascript
He wants to push to existing array so Array.prototype.push.apply(arr1, arr2) is the correct answer, because using arr1.concat(arr2) you are ...
Read more >
How To Push Multiple Elements To An Array In JavaScript
You can push multiple elements to an array in JavaScript using the arr.push('item1', 'item2') statement.
Read more >
Push multiple Values to an Array in JavaScript
Use the Array.push() method to push multiple values to an array, e.g. arr.push('b', 'c', 'd'); . The push() method adds one or more...
Read more >
Push an Object to an Array in JavaScript
To add multiple objects to an array, you can pass multiple objects as arguments to the push() method, which will add all of...
Read more >
Add multiple values to an array using Array.push - YouTube
Add multiple values to an array in JavaScript by calling array. push with a list of arguments. This will append the list of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found