diff --git a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UBulkCopy.cs b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UBulkCopy.cs index 5f9bec62e..55f5b8586 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UBulkCopy.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UBulkCopy.cs @@ -1,4 +1,6 @@ -using System; +using SqlSugar; +using SqlSugar.DbConvert; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -88,10 +90,26 @@ namespace OrmTest db.Fastest().BulkUpdate(new List() { new UnitTable001() { Id=1, table="a"} }); + db.CodeFirst.InitTables(); + db.DbMaintenance.TruncateTable(); + db.Fastest().BulkCopy(new List() + { + new UnitBulkCopyaaa(){ a=DbType.GaussDB } + }); + var value=db.Ado.GetString("select a from UnitBulkCopyaaa"); + if (value != DbType.GaussDB.ToString()) + { + throw new Exception("unit error"); + } Console.WriteLine("用例跑完"); } } + public class UnitBulkCopyaaa + { + [SqlSugar.SugarColumn(ColumnDataType ="varchar(10)",SqlParameterDbType = typeof(EnumToStringConvert))] + public DbType a { get; set; } + } public class UnitTestoffset11 { [SqlSugar.SugarColumn(IsNullable = true)]