mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-03-16 19:10:58 +08:00
- 增加 ISelect.InsertInto 将查询转换为 INSERT INTO t1 SELECT ... FROM t2 执行插入;#469
This commit is contained in:
@@ -392,6 +392,8 @@ namespace FreeSql.Internal.CommonProvider
|
||||
|
||||
public override List<T1> ToList(bool includeNestedMembers = false) => base.ToList(_isIncluded || includeNestedMembers);
|
||||
|
||||
public int InsertInto<TTargetEntity>(string tableName, Expression<Func<T1, TTargetEntity>> select) where TTargetEntity : class => base.InternalInsertInto<TTargetEntity>(tableName, select);
|
||||
|
||||
bool _isIncluded = false;
|
||||
public ISelect<T1> Include<TNavigate>(Expression<Func<T1, TNavigate>> navigateSelector) where TNavigate : class
|
||||
{
|
||||
@@ -1253,6 +1255,8 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
public Task<List<TDto>> ToListAsync<TDto>() => ToListAsync(GetToListDtoSelector<TDto>());
|
||||
|
||||
public Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<T1, TTargetEntity>> select) where TTargetEntity : class => base.InternalInsertIntoAsync<TTargetEntity>(tableName, select);
|
||||
|
||||
public Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, TReturn>> select)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body);
|
||||
|
||||
Reference in New Issue
Block a user