public static Execute ( int count, string title, System.Action fun ) : void | ||
count | int | |
title | string | |
fun | System.Action | |
리턴 | void |
private static void AntData(int eachCount) { GC.Collect(); //回收资源 System.Threading.Thread.Sleep(2000); //休息2秒 //正试比拼 PerHelper.Execute(eachCount, "AntData", () => { var aa = DB.Tables.Tests.FindByBk(1000); }); }
private static void AntData(int eachCount) { GC.Collect(); //回收资源 System.Threading.Thread.Sleep(2000); //休息2秒 //正试比拼 PerHelper.Execute(eachCount, "AntData", () => { DB.BulkCopy(GetList); }); }
private static void SqlSugar(int eachCount) { GC.Collect(); //回收资源 System.Threading.Thread.Sleep(2000); //休息2秒 PerHelper.Execute(eachCount, "SqlSugar", () => { using (SqlSugarClient conn = new SqlSugarClient(PubConst.connectionString)) { var list = conn.Insert(GetItem); } }); }
private static void SqlSugar(int eachCount) { GC.Collect(); //回收资源 System.Threading.Thread.Sleep(2000); //休息2秒 PerHelper.Execute(eachCount, "SqlSugar", () => { using (SqlSugarClient conn = new SqlSugarClient(PubConst.connectionString)) { var list = conn.Queryable <Models.PkDapper.Test>().ToList(); } }); }
private static void SqlSugar(int eachCount) { GC.Collect(); //回收资源 System.Threading.Thread.Sleep(2000); //休息2秒 PerHelper.Execute(eachCount, "SqlSugar", () => { using (SqlSugarClient conn = new SqlSugarClient(PubConst.connectionString)) { var list = conn.SqlQuery <Test>("select * from(select *,row_number() over(order by id) as r from test ) t where t.r between @b and @e ", new { b = 1000, e = 1010 }); } }); }
private static void Dapper(int eachCount) { GC.Collect(); //回收资源 System.Threading.Thread.Sleep(2000); //休息2秒 //正试比拼 PerHelper.Execute(eachCount, "Dapper", () => { using (SqlConnection conn = new SqlConnection(PubConst.connectionString)) { var list = conn.Insert(GetItem); } }); }
private static void SqlSugar(int eachCount) { GC.Collect(); //回收资源 System.Threading.Thread.Sleep(2000); //休息2秒 PerHelper.Execute(eachCount, "SqlSugar", () => { using (SqlSugarClient conn = new SqlSugarClient(PubConst.connectionString)) { var ids = GetDeleteList().Select(it => it.Id).ToArray(); var list = conn.Delete <Test, int>(ids); } }); }