Table
|
public TableOperations( AdoDataConnection connection, Action<Exception> exceptionHandler, IEnumerable<KeyValuePair<string, string>> customTokens = null )
Exception | Condition |
---|---|
ArgumentNullException | connection cannot be null. |
When exception handler is provided, table operations will not throw exceptions for database calls, any encountered exceptions will be passed to handler for processing.
The customTokens can be used to apply run-time tokens to any defined AmendExpressionAttribute values, for example, given the following amendment expression applied to a modeled class:
[AmendExpression("TOP {count}",
TargetExpression = TargetExpression.FieldList,
AffixPosition = AffixPosition.Prefix,
StatementTypes = StatementTypes.SelectSet)]]
int count = 200; customTokens = new[] { new KeyValuePair<string, string>("{count}", $"{count}") };