<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="10.0.1-dev-00185" />

Serilog.Sinks.MSSqlServer.SqlColumn

public class SqlColumn
Shared column customization options.
public bool AllowNull { get; set; }

Indicates whether NULLs can be stored in this column. Default is true. Always required.

public string ColumnName { get; set; }

The name of the column in the database. Always required.

public int DataLength { get; set; }

For character-storage DataTypes such as CHAR or VARCHAR, this defines the maximum size. The default -1 represents MAX.

public SqlDbType DataType { get; set; }

The SQL data type to be stored in this column. Always required.

public bool NonClusteredIndex { get; set; }

Determines whether a non-clustered index is created for this column. Compound indexes are not supported for auto-created log tables. This property is only used when auto-creating a log table.

Specifies the sort direction for a non-clustered index on the SQL column. The default value is Asc. This property is only used when auto-creating a log table.

public string PropertyName { get; set; }

The name of the Serilog property to use as the value when filling the DataTable. If not specified, the ColumnName and PropertyName are the same.

public bool ResolveHierarchicalPropertyName { get; set; }

Controls whether hierarchical expressions in `PropertyName` are evaluated. The default is `true`.

public SqlColumn()

Default constructor.

public SqlColumn(string columnName, SqlDbType dataType, bool allowNull = true, int dataLength = -1)

Constructor with property initialization.

public SqlColumn(DataColumn dataColumn)

A constructor that initializes the object from a DataColumn object.