private static void MultipleIteration(int calls) { var watch = new Stopwatch(); //EF var efquery = new EfQueries(); watch = new Stopwatch(); watch.Start(); var dataEf = efquery.GetOrders(calls); watch.Stop(); Console.WriteLine("EF : " + watch.ElapsedMilliseconds); //Dapper //var dapperquery = new DapperQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataDapper = dapperquery.GetOrders(calls); //watch.Stop(); //Console.WriteLine("Dapper : " + watch.ElapsedMilliseconds); ////Orm lite //var ormLiteQuery = new OrmLiteQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataormLite = ormLiteQuery.GetOrders(calls); //watch.Stop(); //Console.WriteLine("Orm Lite: " + watch.ElapsedMilliseconds); //nPOCO //var nPocoQuery = new NPocoQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataNPoco = nPocoQuery.GetOrders(calls); //watch.Stop(); //Console.WriteLine("NPoco : " + watch.ElapsedMilliseconds); }
private static void SingleCall() { var watch = new Stopwatch(); var efquery = new EfQueries(); watch = new Stopwatch(); watch.Start(); var dataEf = efquery.GetOrders(); watch.Stop(); Console.WriteLine("EF : " + watch.ElapsedMilliseconds); //Dapper //var dapperquery = new DapperQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataDapper = dapperquery.GetOrders(); //watch.Stop(); //Console.WriteLine("Dapper: " + watch.ElapsedMilliseconds); ////Orm lite //var ormLiteQuery = new OrmLiteQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataormLite = ormLiteQuery.GetOrders(); //watch.Stop(); //Console.WriteLine("Orm Lite: " + watch.ElapsedMilliseconds); //Npoco //var nPocoQuery = new NPocoQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataNPoco = nPocoQuery.GetOrders(); //watch.Stop(); //Console.WriteLine("NPoco : " + watch.ElapsedMilliseconds); }
private static void SingleCall() { //Ado.net //var adoquery = new AdoQueries(); var watch = new Stopwatch(); //watch.Start(); //var dataAdo = adoquery.GetOrders(); //watch.Stop(); //Console.WriteLine("ADO.NET: " + watch.ElapsedMilliseconds); //Entity Framework var efquery = new EfQueries(); watch = new Stopwatch(); watch.Start(); var dataEF = efquery.GetOrders(); watch.Stop(); Console.WriteLine("EF: " + watch.ElapsedMilliseconds); //Dapper var dapperquery = new DapperQueries(); watch = new Stopwatch(); watch.Start(); var dataDapper = dapperquery.GetOrders(); watch.Stop(); Console.WriteLine("Dapper: " + watch.ElapsedMilliseconds); //massive dynamic //var massivequery = new MassiveQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataMassiveDynamic = massivequery.GetOrdersDynamic(); //watch.Stop(); //Console.WriteLine("Massive dynamic: " + watch.ElapsedMilliseconds); //massive dynamic to Strongly typed //massivequery = new MassiveQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataMassiveTyped = massivequery.GetOrders(); //watch.Stop(); //Console.WriteLine("Massive strongly typed: " + watch.ElapsedMilliseconds); //Orm lite var ormLiteQuery = new OrmLiteQueries(); watch = new Stopwatch(); watch.Start(); var dataormLite = ormLiteQuery.GetOrders(); watch.Stop(); Console.WriteLine("Orm Lite: " + watch.ElapsedMilliseconds); //Simple data dynamic //var simpleDataQuery = new SimpleDataQueries(); //watch = new Stopwatch(); //watch.Start(); //var datasimpleDataDynamic = simpleDataQuery.GetOrdersDynamic(); //watch.Stop(); //Console.WriteLine("Simple Data dynamic: " + watch.ElapsedMilliseconds); //Simple data dynamic to strongly typed //simpleDataQuery = new SimpleDataQueries(); //watch = new Stopwatch(); //watch.Start(); //var datasimpleData = simpleDataQuery.GetOrders(); //watch.Stop(); //Console.WriteLine("Simple Data strongly typed : " + watch.ElapsedMilliseconds); //var petaPocoQuery = new PetaPocoQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataPetaPoco = petaPocoQuery.GetOrders(); //watch.Stop(); //Console.WriteLine("PetaPoco : " + watch.ElapsedMilliseconds); //var microLiteQuery = new MicroLiteQueries(); //watch = new Stopwatch(); //watch.Start(); //var dataMicroLite = microLiteQuery.GetOrders(); //watch.Stop(); //Console.WriteLine("MicroLite : " + watch.ElapsedMilliseconds); var mightyQuery = new MightyQueries(); watch = new Stopwatch(); watch.Start(); var dataMighty = mightyQuery.GetOrders(); watch.Stop(); Console.WriteLine("Mighty : " + watch.ElapsedMilliseconds); var nPocoQuery = new NPocoQueries(); watch = new Stopwatch(); watch.Start(); var dataNPoco = nPocoQuery.GetOrders(); watch.Stop(); Console.WriteLine("NPoco : " + watch.ElapsedMilliseconds); }