public void Insert1_Warmup() { using (ProductDataSession session = new ProductDataSession("sales")) { AgeRange ageRange = new AgeRange { Max = 20, Min = 0 }; session.Insert(ageRange); } }
public void Insert2_ThreadRepeat() { ThreadedRepeat(Iterations, (index, asserter) => { using (ProductDataSession session = new ProductDataSession("sales")) { AgeRange ageRange = new AgeRange { Max = 20 + index, Min = 0 + index }; session.Insert(ageRange); } }); }
public void Insert3_Parallel() { Parallel.For(0, Iterations, index => { using (ProductDataSession session = new ProductDataSession("sales")) { AgeRange ageRange = new AgeRange { Max = 20 + index, Min = 0 + index }; session.Insert(ageRange); } }); }