Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- var store = DocumentStore.For("host=bla...");
- store.Options.UpdateBatchSize = 10;
- var list = Enumerable.Range(0, 100)
- .Select(x => new TestClass
- {
- Id = Guid.NewGuid().ToString()
- })
- .ToList();
- using(var session = store.LightweightSession())
- {
- session.DeleteWhere<TestClass>(x => x.Id != null);
- list.ForEach(p => session.Store(p));
- session.SaveChanges();
- }
- Console.WriteLine("Done");
- }
- }
- public class TestClass
- {
- public string Id { get; set; }
- }
Add Comment
Please, Sign In to add comment