mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update mysql bytes empty
This commit is contained in:
parent
634a7146e4
commit
257b98fb39
@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
internal class UnitBytesEmpty
|
||||||
|
{
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
var db = NewUnitTest.Db;
|
||||||
|
db.CodeFirst.InitTables<Unitadfasfa2>();
|
||||||
|
db.Insertable(new Unitadfasfa2() { bytes = new byte[] { } }).ExecuteCommand();
|
||||||
|
var xxx=db.Queryable<Unitadfasfa2>().ToList();
|
||||||
|
if (xxx.First().bytes.Length != 0)
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class Unitadfasfa2
|
||||||
|
{
|
||||||
|
public byte[] bytes { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -56,7 +56,7 @@ namespace SqlSugar
|
|||||||
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
||||||
if (bytesString == "0x")
|
if (bytesString == "0x")
|
||||||
{
|
{
|
||||||
bytesString = "0x00";
|
bytesString = "''";
|
||||||
}
|
}
|
||||||
return bytesString;
|
return bytesString;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ namespace SqlSugar
|
|||||||
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
||||||
if (bytesString == "0x")
|
if (bytesString == "0x")
|
||||||
{
|
{
|
||||||
bytesString = "0x00";
|
bytesString = "''";
|
||||||
}
|
}
|
||||||
return bytesString;
|
return bytesString;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user