A customer repository with Dapper
The connected walkthrough contains the canonical repository used by customer registration and lookup. It uses ordinary Dapper calls, owns each created connection and preserves cancellation separately from database failures.
Database and parameter model
Create the SQL table, CustomerKey and CustomerStorageException. Storage constraints remain distinct from form validation.
Finding and storing customers
Read the complete CustomerRepository. Missing rows return absence; failed queries do not.
Supplying the factory
Supply a fresh connection factory. The repository owns its returned connections, not the caller's container. Continue with the HTTP host.