Method BuildInsertStatement
| Improve this Doc View SourceBuildInsertStatement<TSource, TTarget>(DbTable<TTarget>, DbSet<TSource>, Action<ColumnMapper, TSource, TTarget>)
Builds INSERT query statement.
Declaration
public static DbSelectStatement BuildInsertStatement<TSource, TTarget>(this DbTable<TTarget> target, DbSet<TSource> source, Action<ColumnMapper, TSource, TTarget> columnMapper)
where TSource : class, IEntity, new()
where TTarget : class, IEntity, new()
Parameters
| Type | Name | Description |
|---|---|---|
| DbTable<TTarget> | target | The target DbTable. |
| DbSet<TSource> | source | The source DbSet. |
| System.Action<ColumnMapper, TSource, TTarget> | columnMapper | Provides column mappings between source DbSet and target DbTable. |
Returns
| Type | Description |
|---|---|
| DbSelectStatement | The query statement. |
Type Parameters
| Name | Description |
|---|---|
| TSource | Entity type of source DbSet. |
| TTarget | Entity type of target DbTable. |
BuildInsertStatement<TSource, TTarget>(DbTable<TTarget>, DbSet<TSource>, IReadOnlyList<ColumnMapping>)
Builds INSERT query statement.
Declaration
public static DbSelectStatement BuildInsertStatement<TSource, TTarget>(this DbTable<TTarget> target, DbSet<TSource> source, IReadOnlyList<ColumnMapping> columnMappings)
where TSource : class, IEntity, new()
where TTarget : class, IEntity, new()
Parameters
| Type | Name | Description |
|---|---|---|
| DbTable<TTarget> | target | The target DbTable. |
| DbSet<TSource> | source | The source DbSet. |
| System.Collections.Generic.IReadOnlyList<ColumnMapping> | columnMappings | Column mappings between source DbSet and target DbTable. |
Returns
| Type | Description |
|---|---|
| DbSelectStatement | The query statement. |
Type Parameters
| Name | Description |
|---|---|
| TSource | Entity type of source DbSet. |
| TTarget | Entity type of target DbTable. |