mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Update error message
This commit is contained in:
@@ -24,12 +24,19 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public void SetValue(object value)
|
public void SetValue(object value)
|
||||||
{
|
{
|
||||||
var type = EntityColumnInfo.PropertyInfo.PropertyType;
|
try
|
||||||
if (value != null && value.GetType() != type)
|
|
||||||
{
|
{
|
||||||
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
|
public bool IsAnyAttribute<T>() where T : Attribute
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user