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