Synchronization code

This commit is contained in:
sunkaixuan 2023-03-25 21:43:48 +08:00
parent 725994008b
commit cc7d872735

View File

@ -153,7 +153,7 @@ namespace SqlSugar
var pkInfos = this.Context.EntityMaintenance.GetEntityInfo<T>().Columns.Where(it => it.IsPrimarykey); var pkInfos = this.Context.EntityMaintenance.GetEntityInfo<T>().Columns.Where(it => it.IsPrimarykey);
if (whereExpression==null&&!pkInfos.Any()) if (whereExpression==null&&!pkInfos.Any())
{ {
Check.Exception(true, "Need primary key or WhereColumn"); Check.ExceptionEasy(true, "Need primary key or WhereColumn", "使用Storageable实体需要主键或者使用WhereColumn指定条件列");
} }
if (whereExpression == null && pkInfos.Any()) if (whereExpression == null && pkInfos.Any())
{ {