Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (var r in result)
- {
- var newdoc = new UserMailingList
- {
- UserId = new Guid(r.rcid),
- MailingListId = listid,
- StatusId = 0,
- IsDeleted = false,
- Timestamp = DateTime.UtcNow
- };
- batch.Add(newdoc);
- batchsize++;
- if (batchsize == 99999)
- {
- collection.insertmany(batch)
- batchsize = 0;
- batch.Clear();
- }
- }
Add Comment
Please, Sign In to add comment