mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-29 19:56:43 +08:00
Synchronization code
This commit is contained in:
parent
2e94087244
commit
3f39f1c828
@ -19,7 +19,7 @@ namespace SqlSugar
|
||||
public virtual string GetDbTypeName(string csharpTypeName)
|
||||
{
|
||||
if (csharpTypeName == UtilConstants.ByteArrayType.Name)
|
||||
return "varbinary";
|
||||
return "bytea";
|
||||
if (csharpTypeName.ToLower() == "int32")
|
||||
csharpTypeName = "int";
|
||||
if (csharpTypeName.ToLower() == "int16")
|
||||
|
@ -764,7 +764,7 @@ namespace SqlSugar
|
||||
public DataTable ListToDataTable<T>(List<T> list)
|
||||
{
|
||||
DataTable result = new DataTable();
|
||||
if (list.Count > 0)
|
||||
if (list!=null&&list.Count > 0)
|
||||
{
|
||||
PropertyInfo[] propertys = list[0].GetType().GetProperties();
|
||||
foreach (PropertyInfo pi in propertys)
|
||||
|
@ -81,7 +81,7 @@ namespace SqlSugar
|
||||
new KeyValuePair<string, CSharpDataType>("boolean",CSharpDataType.@bool),
|
||||
new KeyValuePair<string, CSharpDataType>("bool",CSharpDataType.@bool),
|
||||
new KeyValuePair<string, CSharpDataType>("box",CSharpDataType.@bool),
|
||||
new KeyValuePair<string, CSharpDataType>("bytea",CSharpDataType.@bool),
|
||||
new KeyValuePair<string, CSharpDataType>("bytea",CSharpDataType.byteArray),
|
||||
|
||||
new KeyValuePair<string, CSharpDataType>("varchar",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("character varying",CSharpDataType.@string),
|
||||
|
@ -62,8 +62,8 @@ namespace SqlSugar
|
||||
new KeyValuePair<string, CSharpDataType>("smallint",CSharpDataType.@short),
|
||||
new KeyValuePair<string, CSharpDataType>("tinyint",CSharpDataType.@byte),
|
||||
new KeyValuePair<string, CSharpDataType>("uniqueidentifier",CSharpDataType.Guid),
|
||||
new KeyValuePair<string, CSharpDataType>("binary",CSharpDataType.byteArray),
|
||||
new KeyValuePair<string, CSharpDataType>("image",CSharpDataType.byteArray),
|
||||
new KeyValuePair<string, CSharpDataType>("binary",CSharpDataType.byteArray),
|
||||
new KeyValuePair<string, CSharpDataType>("varbinary",CSharpDataType.byteArray),
|
||||
new KeyValuePair<string, CSharpDataType>("datetimeoffset", CSharpDataType.DateTimeOffset),
|
||||
new KeyValuePair<string, CSharpDataType>("datetimeoffset", CSharpDataType.DateTime)};
|
||||
|
Loading…
Reference in New Issue
Block a user