示例#1
0
 public void Insert1_Warmup()
 {
     using (ProductDataSession session = new ProductDataSession("sales"))
     {
         AgeRange ageRange = new AgeRange {
             Max = 20, Min = 0
         };
         session.Insert(ageRange);
     }
 }
示例#2
0
 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);
         }
     });
 }
示例#3
0
 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);
         }
     });
 }