mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Merge branch 'SqlSugar5' of https://github.com/sunkaixuan/SqlSugar
This commit is contained in:
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("5.0.0.18")]
|
[assembly: AssemblyVersion("5.0.0.19")]
|
||||||
[assembly: AssemblyFileVersion("5.0.0.18")]
|
[assembly: AssemblyFileVersion("5.0.0.19")]
|
||||||
|
@@ -101,7 +101,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else if (type == UtilConstants.ByteArrayType)
|
else if (type == UtilConstants.ByteArrayType)
|
||||||
{
|
{
|
||||||
string bytesString = "0x" + BitConverter.ToString((byte[])value);
|
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
||||||
return bytesString;
|
return bytesString;
|
||||||
}
|
}
|
||||||
else if (type == UtilConstants.BoolType)
|
else if (type == UtilConstants.BoolType)
|
||||||
|
@@ -56,7 +56,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else if (type == UtilConstants.ByteArrayType)
|
else if (type == UtilConstants.ByteArrayType)
|
||||||
{
|
{
|
||||||
string bytesString = "0x" + BitConverter.ToString((byte[])value);
|
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
||||||
return bytesString;
|
return bytesString;
|
||||||
}
|
}
|
||||||
else if (type == UtilConstants.BoolType)
|
else if (type == UtilConstants.BoolType)
|
||||||
|
50
Src/Asp.Net/SqliteTest/Bugs/BugTest.cs
Normal file
50
Src/Asp.Net/SqliteTest/Bugs/BugTest.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OrmTest.Test
|
||||||
|
{
|
||||||
|
public class BugTest
|
||||||
|
{
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
var db = GetInstance();
|
||||||
|
db.CodeFirst.InitTables<InTest>();
|
||||||
|
List<InTest> tl = new List<InTest>();
|
||||||
|
for (int i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
InTest t = new InTest();
|
||||||
|
t.name = "1";
|
||||||
|
t.aa = new byte[] { 1, 32, 12, 33 };
|
||||||
|
tl.Add(t);
|
||||||
|
}
|
||||||
|
db.Insertable(tl).ExecuteCommand();
|
||||||
|
}
|
||||||
|
private static SqlSugarClient GetInstance()
|
||||||
|
{
|
||||||
|
return new SqlSugarClient(new ConnectionConfig()
|
||||||
|
{
|
||||||
|
DbType = SqlSugar.DbType.Sqlite,
|
||||||
|
ConnectionString = Config.ConnectionString,
|
||||||
|
InitKeyType = InitKeyType.Attribute,
|
||||||
|
IsAutoCloseConnection = true,
|
||||||
|
AopEvents = new AopEvents
|
||||||
|
{
|
||||||
|
OnLogExecuting = (sql, p) =>
|
||||||
|
{
|
||||||
|
Console.WriteLine(sql);
|
||||||
|
Console.WriteLine(string.Join(",", p?.Select(it => it.ParameterName + ":" + it.Value)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public class InTest
|
||||||
|
{
|
||||||
|
public byte[] aa { get; set; }
|
||||||
|
public string name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -48,6 +48,7 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Bugs\BugTest.cs" />
|
||||||
<Compile Include="Config.cs" />
|
<Compile Include="Config.cs" />
|
||||||
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
||||||
<Compile Include="Demo\Demo1_Queryable.cs" />
|
<Compile Include="Demo\Demo1_Queryable.cs" />
|
||||||
|
Reference in New Issue
Block a user