mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add 达梦 demo
This commit is contained in:
parent
dee774e2c6
commit
b58a871d74
66
Src/Asp.NetCore2/DmOrmTest/UnitTest/UBulkCopy.cs
Normal file
66
Src/Asp.NetCore2/DmOrmTest/UnitTest/UBulkCopy.cs
Normal file
@ -0,0 +1,66 @@
|
||||
using SqlSugar;
|
||||
using SqlSugar.DbConvert;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public partial class NewUnitTest
|
||||
{
|
||||
public static void Bulk()
|
||||
{
|
||||
var db = NewUnitTest.Db;
|
||||
db.DbMaintenance.DropTable<UnitBulkCopyaaa>();
|
||||
db.CodeFirst.InitTables<UnitBulkCopyaaa>();
|
||||
db.DbMaintenance.TruncateTable<UnitBulkCopyaaa>();
|
||||
db.Fastest<UnitBulkCopyaaa>().BulkCopy(new List<UnitBulkCopyaaa>()
|
||||
{
|
||||
new UnitBulkCopyaaa(){ a=DbType.GaussDB,Id=1 }
|
||||
});
|
||||
db.Fastest<UnitBulkCopyaaa>().BulkUpdate(new List<UnitBulkCopyaaa>()
|
||||
{
|
||||
new UnitBulkCopyaaa(){ a=DbType.GaussDB,Id=1 }
|
||||
});
|
||||
Console.WriteLine("用例跑完");
|
||||
}
|
||||
|
||||
}
|
||||
public class UnitBulkCopyaaa
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey =true)]
|
||||
public int Id { get; set; }
|
||||
[SqlSugar.SugarColumn(ColumnDataType ="varchar(10)",SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public DbType a { get; set; }
|
||||
}
|
||||
public class UnitTestoffset11
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsNullable = true)]
|
||||
public DateTimeOffset? DateTimeOffset { get; set; }
|
||||
}
|
||||
public class UnitTable001
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
|
||||
public int Id { get; set; }
|
||||
public string table { get; set; }
|
||||
}
|
||||
public class UnitIdentity111
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
public class UnitIdentity111111111
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class UnitIdentity1
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey =true,IsIdentity =true)]
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user