- 修复 InsertOrUpdateDict 异常;#1067

This commit is contained in:
2881099
2022-04-11 13:23:38 +08:00
parent ecd27fb3ae
commit 7c2b7ea5ef
21 changed files with 331 additions and 41 deletions

View File

@@ -572,6 +572,7 @@ namespace FreeSql.Internal.CommonProvider
public IInsert<T1> AsType(Type entityType)
{
if (entityType == typeof(object)) throw new Exception("IInsert.AsType 参数不支持指定为 object");
if (entityType == typeof(T1)) return this;
if (entityType == _table.Type) return this;
var newtb = _commonUtils.GetTableByEntity(entityType);
_table = newtb ?? throw new Exception("IInsert.AsType 参数错误,请传入正确的实体类型");