Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.55 KB

api-overview.md

File metadata and controls

46 lines (31 loc) · 1.55 KB
title API Overview
description Find the main configuration, mapping, query, and runtime entry points.
Home/Reference/API Overview

Required package: Dapper.FluentMap

Problem solved

Find the main configuration, mapping, query, and runtime entry points.

When to use it

Use this capability when the column shape and .NET model should remain separated by explicit, reviewable configuration.

Example

public sealed class CustomerMap : EntityMap<Customer>
{
    public CustomerMap()
    {
        Map(x => x.Id).ToColumn("customer_id");
        Map(x => x.Name).ToColumn("customer_name");
    }
}

How it works

FluentMap registers typed metadata and applies it through the matching materialization path. SQL, connections, parameters, and lifecycle remain responsibilities of the application and Dapper.

Constraints

:::caution Initialize before concurrent queries and treat the effective configuration as read-only afterward. :::

Related references