mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Insertable Updateable Dictionary BUG
This commit is contained in:
@@ -8,8 +8,8 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
public class Config
|
public class Config
|
||||||
{
|
{
|
||||||
public static string ConnectionString = "server=.;uid=sa;pwd=sasa;database=SqlSugar4XTest";
|
public static string ConnectionString = "server=.;uid=sa;pwd=@jhl85661501;database=SqlSugar4XTest";
|
||||||
public static string ConnectionString2 = "server=.;uid=sa;pwd=sasa;database=SQLSUGAR4XTEST";
|
public static string ConnectionString2 = "server=.;uid=sa;pwd=@jhl85661501;database=SQLSUGAR4XTEST";
|
||||||
public static string ConnectionString3 = "server=.;uid=sa;pwd=sasa;database=sqlsugar4xtest";
|
public static string ConnectionString3 = "server=.;uid=sa;pwd=@jhl85661501;database=sqlsugar4xtest";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -74,7 +74,8 @@ namespace OrmTest.Demo
|
|||||||
|
|
||||||
var dt = new Dictionary<string, object>();
|
var dt = new Dictionary<string, object>();
|
||||||
dt.Add("id", 1);
|
dt.Add("id", 1);
|
||||||
dt.Add("name", "1");
|
dt.Add("name", null);
|
||||||
|
dt.Add("createTime", DateTime.Now);
|
||||||
var t66 = db.Updateable(dt).AS("student").With(SqlWith.UpdLock).ExecuteCommand();
|
var t66 = db.Updateable(dt).AS("student").With(SqlWith.UpdLock).ExecuteCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -63,6 +63,7 @@ namespace OrmTest.Demo
|
|||||||
|
|
||||||
var dt = new Dictionary<string, object>();
|
var dt = new Dictionary<string, object>();
|
||||||
dt.Add("name", "1");
|
dt.Add("name", "1");
|
||||||
|
dt.Add("CreateTime", null);
|
||||||
var t66 = db.Insertable(dt).AS("student").ExecuteReturnIdentity();
|
var t66 = db.Insertable(dt).AS("student").ExecuteReturnIdentity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -289,7 +289,7 @@ namespace SqlSugar
|
|||||||
Value = column.Value,
|
Value = column.Value,
|
||||||
DbColumnName = column.Key,
|
DbColumnName = column.Key,
|
||||||
PropertyName = column.Key,
|
PropertyName = column.Key,
|
||||||
PropertyType = UtilMethods.GetUnderType(column.Value.GetType()),
|
PropertyType = column.Value == null? DBNull.Value.GetType(): UtilMethods.GetUnderType(column.Value.GetType()),
|
||||||
TableId = i
|
TableId = i
|
||||||
};
|
};
|
||||||
if (columnInfo.PropertyType.IsEnum())
|
if (columnInfo.PropertyType.IsEnum())
|
||||||
|
@@ -280,7 +280,7 @@ namespace SqlSugar
|
|||||||
Value = column.Value,
|
Value = column.Value,
|
||||||
DbColumnName =column.Key,
|
DbColumnName =column.Key,
|
||||||
PropertyName = column.Key,
|
PropertyName = column.Key,
|
||||||
PropertyType = UtilMethods.GetUnderType(column.Value.GetType()),
|
PropertyType = column.Value==null?DBNull.Value.GetType():UtilMethods.GetUnderType(column.Value.GetType()),
|
||||||
TableId = i
|
TableId = i
|
||||||
};
|
};
|
||||||
if (columnInfo.PropertyType.IsEnum())
|
if (columnInfo.PropertyType.IsEnum())
|
||||||
|
Reference in New Issue
Block a user