Update CodeFirst default value

This commit is contained in:
sunkaixuan 2025-03-17 20:22:33 +08:00
parent d9c8bb5ca4
commit 292ec93dd9

View File

@ -386,7 +386,7 @@ namespace SqlSugar
}
else if (columnInfo.DataType.ObjToString().ToLower().IsIn("float","double","decimal","int","int4","bigint","int8","int2")&& columnInfo.DefaultValue.IsInt())
{
value = columnInfo.DefaultValue;
value =Convert.ToInt32(columnInfo.DefaultValue);
}
return value;
}