Table of Contents

Class SimpleBuilderOptions

Namespace
Dapper.SimpleSqlBuilder.DependencyInjection
Assembly
Dapper.SimpleSqlBuilder.DependencyInjection.dll

An options class for configuring the builders settings.

public sealed class SimpleBuilderOptions

Inheritance

Fields

ConfigurationSectionName

The configuration section name for the builders settings.

public const string ConfigurationSectionName = "SimpleSqlBuilder"

Field Value

string

Properties

DatabaseParameterNameTemplate

Gets or sets the parameter name template used to create the parameter names for the generated SQL. The default is p, so the parameter names will be generated as p0, p1, etc.

Example: If you set the template to param, it will generate param0, param1, etc.

public string DatabaseParameterNameTemplate { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when new value is null, Empty, or contains only white-space.

DatabaseParameterPrefix

Gets or sets the parameter prefix used in the rendered SQL. The default is @, so you will get @p0, @p1, etc.

Example: If you set the parameter prefix to :, it will generate :p0, :p1, etc.

public string DatabaseParameterPrefix { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when new value is null, Empty, or contains only white-space.

ReuseParameters

Gets or sets the value indicating whether to reuse parameters or not. The default value is false.

Example: If set to true parameters are reused and if set false to they are not.

public bool ReuseParameters { get; set; }

Property Value

bool

UseLowerCaseClauses

Get the value indicating whether SQL clauses should be in upper case or lower case. The default value is false meaning SQL clauses will be in upper cases. i.e. SELECT, UPDATE, etc.

Example: If set to true, SQL clauses will be in lower cases i.e. select, update, etc.

public bool UseLowerCaseClauses { get; set; }

Property Value

bool