- 增加 fsql.InsertDict/UpdateDict/DeleteDict 字典操作的扩展方法;#481

This commit is contained in:
2881099
2022-03-25 19:07:47 +08:00
parent dc688adc11
commit 0fcc5619be
22 changed files with 491 additions and 91 deletions

View File

@@ -15,7 +15,11 @@ namespace FreeSql.Internal.CommonProvider
public ISelect<T1> Select<T1>() where T1 : class => CreateSelectProvider<T1>(null);
public ISelect<T1> Select<T1>(object dywhere) where T1 : class => CreateSelectProvider<T1>(dywhere);
public IInsert<T1> Insert<T1>() where T1 : class => CreateInsertProvider<T1>();
public IInsert<T1> Insert<T1>() where T1 : class
{
if (typeof(T1) == typeof(Dictionary<string, object>)) throw new Exception("请使用 fsql.InsertDict(dict) 方法插入字典数据");
return CreateInsertProvider<T1>();
}
public IInsert<T1> Insert<T1>(T1 source) where T1 : class => this.Insert<T1>().AppendData(source);
public IInsert<T1> Insert<T1>(T1[] source) where T1 : class => this.Insert<T1>().AppendData(source);
public IInsert<T1> Insert<T1>(List<T1> source) where T1 : class => this.Insert<T1>().AppendData(source);