mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
28 lines
734 B
C#
28 lines
734 B
C#
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace OrmTest
|
|
{
|
|
internal class DemoL_BulkCopy
|
|
{
|
|
public static void Init()
|
|
{
|
|
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
|
|
{
|
|
DbType = DbType.QuestDB,
|
|
ConnectionString = Config.ConnectionString3,
|
|
InitKeyType = InitKeyType.Attribute,
|
|
IsAutoCloseConnection = true
|
|
});
|
|
|
|
var list=db.Queryable<Order>().Take(2).ToList();
|
|
var i=db.RestApi().BulkCopy(list);
|
|
var i2 = db.RestApi().ExecuteCommand("select 1");
|
|
}
|
|
}
|
|
}
|