diff --git a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs index b41a0f2da..d997196b1 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs @@ -115,6 +115,7 @@ namespace SqlSugar public IDeleteable Where(T deleteObj) { + Check.Exception(GetPrimaryKeys().IsNullOrEmpty(), "Where(entity) Primary key required"); Where(new List() { deleteObj }); return this; }