private async Task PopulateCollection(CollectionReference collection, IEnumerable <object> documents) { var batch = FirestoreDb.CreateWriteBatch(); foreach (var doc in documents) { batch.Create(collection.GenerateDocument(), doc); } await batch.CommitAsync(); }