Exemplo n.º 1
0
        public string GetTotalSql <T>(string where)
        {
            var table = SqlServerCache.GetTableEntity <T>();

            return(string.Format("SELECT COUNT(1) FROM [{0}] WITH(NOLOCK) {1}", table.TableName, where));
        }
Exemplo n.º 2
0
        public static string BulkUpdate <T>(this IDbConnection conn, DataTable dt, string column = "*", int batchSize = 20000, int timeOut = 100)
        {
            var table = SqlServerCache.GetTableEntity <T>();

            return(BulkUpdate(conn, dt, table.TableName, column, batchSize, timeOut));
        }
Exemplo n.º 3
0
 public string GetDeleteAllSql <T>()
 {
     return(SqlServerCache.GetTableEntity <T>().DeleteAllSql);
 }
Exemplo n.º 4
0
        public static string BulkCopy <T>(this IDbConnection conn, DataTable dt, string copyFields = null, bool insert_identity = false, int batchSize = 20000, int timeout = 100)
        {
            var table = SqlServerCache.GetTableEntity <T>();

            return(BulkCopy(conn, dt, table.TableName, copyFields, insert_identity, batchSize, timeout));
        }