GlobalConfigurationOptions

A class that is being used to define the globalized configurations for the application.

This class contains the options used to define global configuration for the library.

Properties

Name Description
ConversionType Defines the conversion logic when mapping a DbDataReader to a .NET CLR class.
DefaultBatchOperationSize The default batch size for InsertAll, MergeAll, and UpdateAll operations.
DefaultCacheItemExpirationInMinutes The default cache expiration in minutes.
EnumDefaultDatabaseType The default DbType for enumerations used as parameters in non-entity-based operations.
KeyColumnReturnBehavior Defines how push operations (Insert, InsertAll, Merge, MergeAll) return values from key columns (Primary and Identity).

Setup

var options = new GlobalConfigurationOptions()
{
    ConversionType = ConversionType.Default,
    DefaultBatchOperationSize = Constant.DefaultBatchOperationSize,
    DefaultCacheItemExpirationInMinutes = Constant.DefaultCacheItemExpirationInMinutes,
    EnumDefaultDatabaseType = DbType.String,
    KeyColumnReturnBehavior = KeyColumnReturnBehavior.IdentityOrElsePrimary
};
GlobalConfiguration.Setup(options);

All options are optional. The values shown above are the defaults.