Skip to content

DapperMaticTypeMapping ​

Namespace: MJCZone.DapperMatic.TypeMapping

Assembly: MJCZone.DapperMatic

Summary ​

Provides global initialization for DapperMatic query compatibility. Call Initialize() once at application startup to enable DmColumn attribute mapping and custom type handlers for all IDbConnection instances.

static public

Contents ​

Methods (8)

Methods ​

MethodSummary
InitializeInitialize DapperMatic query compatibility for all IDbConnection instances. Call this ONCE during ap...
RegisterModelsRegisters handlers for the property types of the given models, such as <c>List<OrderLine&gt...
RegisterAssemblyRegisters handlers for the property types of every model in an assembly.
RegisterJsonTypesStores values of the given types as JSON, wherever they appear: as a parameter, a column or a proper...
GetType
ToString
Equals
GetHashCode

Initialize ​

Initialize DapperMatic query compatibility for all IDbConnection instances. Call this ONCE during application startup (Program.cs, Startup.cs, etc.). This registers type handlers and configures Dapper's type mapping system globally.

csharp
void? Initialize(DapperMaticMappingOptions options)

Parameters ​

Returns ​

Type: void?

RegisterModels ​

Registers handlers for the property types of the given models, such as <c>List<OrderLine></c>, for models DapperMaticMappingOptions) could not find.

csharp
RegisterModels(Type[] modelTypes)

Parameters ​

  • modelTypes (Type[]) - The model classes.

RegisterAssembly ​

Registers handlers for the property types of every model in an assembly.

csharp
void RegisterAssembly(Assembly assembly)

Parameters ​

  • assembly (Assembly) - The assembly.

RegisterJsonTypes ​

Stores values of the given types as JSON, wherever they appear: as a parameter, a column or a property.

csharp
RegisterJsonTypes(Type[] types)

Parameters ​

  • types (Type[]) - class.

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()