mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update error message
This commit is contained in:
parent
d36ba63b47
commit
9d2336aaa9
@ -24,12 +24,19 @@ namespace SqlSugar
|
||||
|
||||
public void SetValue(object value)
|
||||
{
|
||||
var type = EntityColumnInfo.PropertyInfo.PropertyType;
|
||||
if (value != null && value.GetType() != type)
|
||||
try
|
||||
{
|
||||
value = UtilMethods.ChangeType2(value, type);
|
||||
var type = EntityColumnInfo.PropertyInfo.PropertyType;
|
||||
if (value != null && value.GetType() != type)
|
||||
{
|
||||
value = UtilMethods.ChangeType2(value, type);
|
||||
}
|
||||
this.EntityColumnInfo.PropertyInfo.SetValue(EntityValue, value);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Check.ExceptionEasy($" SetValue error in DataExecuting {EntityName} . {ex.Message}", $" DataExecuting 中 SetValue出错 {EntityName} 。 {ex.Message}");
|
||||
}
|
||||
this.EntityColumnInfo.PropertyInfo.SetValue(EntityValue, value);
|
||||
}
|
||||
public bool IsAnyAttribute<T>() where T : Attribute
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user