using (var sess = doc.BulkInsert())
{
for (var i = 0; i < 10; i++)
{
var col = new Collection
{
Name = string.Format(" Collection number: {0}", i)
};
sess.Store(col);
}
}
My full method
public void MakeData()
{
var doc = DocumentStoreHolder.DocumentStore;
doc.Initialize();
using (var sess = doc.BulkInsert())
{
for (var i = 0; i < 10; i++)
{
var col = new Collection
{
Name = string.Format(" Collection number: {0}", i)
};
sess.Store(col);
}
}
}
--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "ravendb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/SuVlI5g30wo/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
var docstore = new DocumentStore { ConnectionStringName = "RavenDB" };
using (var bulkInsert = docstore.Initialize().BulkInsert())
{
for (int i = 0; i < 1000 * 1000; i++)
{
bulkInsert.Store(new Game
{
HeartBeat= DateTime.Now.AddMinutes(i/10)
},"games/"+Guid.NewGuid().ToString());
}
}
The Exception:
--
You received this message because you are subscribed to a topic in the Google Groups "ravendb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/SuVlI5g30wo/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
+1
remove windows auth for good. api keys or oauth.
--
--
You received this message because you are subscribed to a topic in the Google Groups "ravendb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/SuVlI5g30wo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.