mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
MySql CodeFirst Sbyte
This commit is contained in:
parent
88289544bf
commit
cd71d6ebef
@ -36,6 +36,12 @@ namespace OrmTest
|
||||
b=it.b
|
||||
}).ToList();
|
||||
Db.CodeFirst.InitTables<UnitTest012213>();
|
||||
Db.CodeFirst.InitTables<UnitTest3131>();
|
||||
}
|
||||
|
||||
public class UnitTest3131
|
||||
{
|
||||
public sbyte Id { get; set; }
|
||||
}
|
||||
public class UnitTest012213
|
||||
{
|
||||
|
@ -20,6 +20,8 @@ namespace SqlSugar
|
||||
csharpTypeName = "long";
|
||||
if (csharpTypeName == "Boolean")
|
||||
csharpTypeName = "bool";
|
||||
if (csharpTypeName == "SByte")
|
||||
csharpTypeName = "Byte";
|
||||
var mappings = this.MappingTypes.Where(it => it.Value.ToString().Equals(csharpTypeName, StringComparison.CurrentCultureIgnoreCase));
|
||||
return mappings.HasValue() ? mappings.First().Key : "varchar";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user