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
| Method | Summary |
|---|---|
| Initialize | Initialize DapperMatic query compatibility for all IDbConnection instances. Call this ONCE during ap... |
| RegisterModels | Registers handlers for the property types of the given models, such as <c>List<OrderLine>... |
| RegisterAssembly | Registers handlers for the property types of every model in an assembly. |
| RegisterJsonTypes | Stores 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.
void? Initialize(DapperMaticMappingOptions options)Parameters
- options (DapperMaticMappingOptions) - Optional configuration options. If null, defaults are used.
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.
RegisterModels(Type[] modelTypes)Parameters
- modelTypes (Type[]) - The model classes.
RegisterAssembly
Registers handlers for the property types of every model in an assembly.
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.
RegisterJsonTypes(Type[] types)Parameters
- types (Type[]) - class.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()