mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-29 01:47:06 +08:00
Add Check
This commit is contained in:
parent
7d49560e66
commit
560983a34a
@ -30,6 +30,7 @@ namespace SqlSugar
|
||||
PreToSql();
|
||||
string sql = UpdateBuilder.ToSqlString();
|
||||
RestoreMapping();
|
||||
Check.Exception(UpdateBuilder.WhereValues.IsNullOrEmpty() && GetPrimaryKeys().IsNullOrEmpty(), "You cannot have no primary key and no conditions");
|
||||
return this.Ado.ExecuteCommand(sql, UpdateBuilder.Parameters == null ? null : UpdateBuilder.Parameters.ToArray());
|
||||
}
|
||||
public IUpdateable<T> AS(string tableName)
|
||||
|
Loading…
Reference in New Issue
Block a user