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));
        }
示例#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));
        }
 public string GetDeleteAllSql <T>()
 {
     return(SqlServerCache.GetTableEntity <T>().DeleteAllSql);
 }
示例#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));
        }