Table of Contents

Interface IEntityInsertSpec<TTarget, TBuilder>

Namespace
LinqToDB.Linq
Assembly
linq2db.dll

F-bounded base for entity-INSERT-builder fluent chains. Declares the chain methods that are common to standalone Insert (IEntityInsertSpec<TTarget>) and the Upsert INSERT branch (IUpsertInsertSpec<TTarget>); each leaf interface substitutes itself as TBuilder so chain methods return the correct concrete builder type.

public interface IEntityInsertSpec<TTarget, TBuilder> where TTarget : notnull where TBuilder : IEntityInsertSpec<TTarget, TBuilder>

Type Parameters

TTarget

Target table record type.

TBuilder

Concrete leaf builder type (F-bound: must derive from this interface with itself substituted).

Extension Methods

Remarks

This interface is used only as the receiver type of an expression tree captured by linq2db. The configure expression is parsed by linq2db and is not invoked; implementing this interface is not a supported extension point.

Methods

Ignore<TV>(Expression<Func<TTarget, TV>>)

Excludes a target column from the INSERT statement.

TBuilder Ignore<TV>(Expression<Func<TTarget, TV>> field)

Parameters

field Expression<Func<TTarget, TV>>

Returns

TBuilder

Type Parameters

TV

Set<TV>(Expression<Func<TTarget, TV>>, Expression<Func<TTarget, TV>>)

Sets a target column's value during INSERT from the source row.

TBuilder Set<TV>(Expression<Func<TTarget, TV>> field, Expression<Func<TTarget, TV>> value)

Parameters

field Expression<Func<TTarget, TV>>
value Expression<Func<TTarget, TV>>

Returns

TBuilder

Type Parameters

TV

Set<TV>(Expression<Func<TTarget, TV>>, Expression<Func<TV>>)

Sets a target column's value during INSERT from a context-free expression.

TBuilder Set<TV>(Expression<Func<TTarget, TV>> field, Expression<Func<TV>> value)

Parameters

field Expression<Func<TTarget, TV>>
value Expression<Func<TV>>

Returns

TBuilder

Type Parameters

TV