mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-07 18:04:55 +08:00
MySql CodeFirst Sbyte
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user