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