update Exception message

This commit is contained in:
2881099
2022-05-09 15:52:59 +08:00
parent 98e9430db7
commit e2d6c890a9
3 changed files with 29 additions and 3 deletions

View File

@@ -1003,7 +1003,7 @@ namespace FreeSql.Internal.CommonProvider
sb.Append(" \r\nWHERE ");
if (_source.Any())
{
if (_tempPrimarys.Any() == false) throw new ArgumentException($"{_table.Type.DisplayCsharp()} 没有定义主键,无法使用 SetSource请尝试 SetDto");
if (_tempPrimarys.Any() == false) throw new ArgumentException($"{_table.Type.DisplayCsharp()} 没有定义主键,无法使用 SetSource请尝试 SetDto 或者 SetSource 指定临时主键");
sb.Append('(').Append(_commonUtils.WhereItems(_tempPrimarys, "", _source)).Append(')');
}