Method BuildUpdateStatement
| Improve this Doc View SourceBuildUpdateStatement(IDbTable, IDbTable, IReadOnlyList<ColumnMapping>, IReadOnlyList<ColumnMapping>)
Builds UPDATE query statement.
Declaration
public static DbSelectStatement BuildUpdateStatement(this IDbTable target, IDbTable source, IReadOnlyList<ColumnMapping> columnMappings, IReadOnlyList<ColumnMapping> keyMappings)
Parameters
Type | Name | Description |
---|---|---|
IDbTable | target | The target DbTable. |
IDbTable | source | The source DbTable. |
System.Collections.Generic.IReadOnlyList<ColumnMapping> | columnMappings | Column mappings between source and target DbTables. |
System.Collections.Generic.IReadOnlyList<ColumnMapping> | keyMappings | Key mappings between source and target DbTables. |
Returns
Type | Description |
---|---|
DbSelectStatement | The query statement |
BuildUpdateStatement<TSource, TTarget>(DbTable<TTarget>, DbSet<TSource>, IReadOnlyList<ColumnMapping>, IReadOnlyList<ColumnMapping>)
Builds UPDATE query statement.
Declaration
public static DbSelectStatement BuildUpdateStatement<TSource, TTarget>(this DbTable<TTarget> target, DbSet<TSource> source, IReadOnlyList<ColumnMapping> columnMappings, IReadOnlyList<ColumnMapping> keyMappings)
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 DbTable. |
System.Collections.Generic.IReadOnlyList<ColumnMapping> | columnMappings | Column mappings between source and target DbTables. |
System.Collections.Generic.IReadOnlyList<ColumnMapping> | keyMappings | Key mappings between source and target DbTables. |
Returns
Type | Description |
---|---|
DbSelectStatement | The query statement |
Type Parameters
Name | Description |
---|---|
TSource | |
TTarget |
BuildUpdateStatement<TSource, TTarget>(DbTable<TTarget>, DbSet<TSource>, Action<ColumnMapper, TSource, TTarget>, IReadOnlyList<ColumnMapping>)
Builds UPDATE query statement.
Declaration
public static DbSelectStatement BuildUpdateStatement<TSource, TTarget>(this DbTable<TTarget> target, DbSet<TSource> source, Action<ColumnMapper, TSource, TTarget> columnMapper, IReadOnlyList<ColumnMapping> keyMappings)
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 DbTable. |
System.Action<ColumnMapper, TSource, TTarget> | columnMapper | Provides column mappings between source and target DbTables. |
System.Collections.Generic.IReadOnlyList<ColumnMapping> | keyMappings | Key mappings between source and target DbTables. |
Returns
Type | Description |
---|---|
DbSelectStatement | The query statement |
Type Parameters
Name | Description |
---|---|
TSource | |
TTarget |