private static void MultipleSourceCached(System.Random Rand) { foreach (Employee2 Employee2 in 100.Times(x => Rand.NextClass<Employee2>())) { using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Save")) { Employee2.Save(); } } for (int x = 0; x < 100; ++x) { using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached All")) { Employee2.All(); } } for (int x = 0; x < 100; ++x) { using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Any")) { Employee2.Any(); } } for (int x = 0; x < 100; ++x) { using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Paged")) { Employee2.Paged(); } } }
private static void MultipleSourceCachedCascade(System.Random Rand) { foreach (Employee3 Employee3 in 100.Times(x => Rand.NextClass<Employee3>())) { Employee3.Boss = Rand.NextClass<Employee3>(); using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Save")) { Employee3.Save(); } } for (int x = 0; x < 100; ++x) { using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade All")) { Employee3.All().ForEach(y => { var Temp = y.Boss; }); } } for (int x = 0; x < 100; ++x) { using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Any")) { var Temp = Employee3.Any().Boss; } } for (int x = 0; x < 100; ++x) { using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Paged")) { Employee3.Paged().ForEach(y => { var Temp = y.Boss; }); } } }