mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-12-22 09:05:47 +08:00
- 修复 InsertDict/UpdateDict 等字典操作在 DbContext.Orm 下无法使用的 bug;#1064
This commit is contained in:
@@ -15,15 +15,28 @@ 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
|
||||
public IInsert<T1> Insert<T1>() where T1 : class => CreateInsertProvider<T1>();
|
||||
public IInsert<T1> Insert<T1>(T1 source) where T1 : class
|
||||
{
|
||||
if (typeof(T1) == typeof(Dictionary<string, object>)) throw new Exception("请使用 fsql.InsertDict(dict) 方法插入字典数据");
|
||||
return CreateInsertProvider<T1>();
|
||||
return this.Insert<T1>().AppendData(source);
|
||||
}
|
||||
public IInsert<T1> Insert<T1>(T1[] source) where T1 : class
|
||||
{
|
||||
if (typeof(T1) == typeof(Dictionary<string, object>)) throw new Exception("请使用 fsql.InsertDict(dict) 方法插入字典数据");
|
||||
return this.Insert<T1>().AppendData(source);
|
||||
}
|
||||
public IInsert<T1> Insert<T1>(List<T1> source) where T1 : class
|
||||
{
|
||||
|
||||
if (typeof(T1) == typeof(Dictionary<string, object>)) throw new Exception("请使用 fsql.InsertDict(dict) 方法插入字典数据");
|
||||
return this.Insert<T1>().AppendData(source);
|
||||
}
|
||||
public IInsert<T1> Insert<T1>(IEnumerable<T1> source) where T1 : class
|
||||
{
|
||||
if (typeof(T1) == typeof(Dictionary<string, object>)) throw new Exception("请使用 fsql.InsertDict(dict) 方法插入字典数据");
|
||||
return 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>(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);
|
||||
public IInsert<T1> Insert<T1>(IEnumerable<T1> source) where T1 : class => this.Insert<T1>().AppendData(source);
|
||||
public IUpdate<T1> Update<T1>() where T1 : class => CreateUpdateProvider<T1>(null);
|
||||
public IUpdate<T1> Update<T1>(object dywhere) where T1 : class => CreateUpdateProvider<T1>(dywhere);
|
||||
public IDelete<T1> Delete<T1>() where T1 : class => CreateDeleteProvider<T1>(null);
|
||||
|
||||
Reference in New Issue
Block a user