Use with Dapper
dotnet add package AdCodicem.ValueObjects.Dapper
ValueObjectDapper.AddValueObjectHandlers(typeof(Iban).Assembly); // once, at start-up
That registers a type handler for every value object of the assembly. From then on a value object can be a query parameter and a column of a result, with no projection:
var account = await connection.QuerySingleOrDefaultAsync<BankAccount>(
"SELECT iban AS Iban, balance AS Balance FROM accounts WHERE iban = @iban",
new { iban });
Dapper keeps its handlers in a process-wide table, so the call belongs at start-up rather than per connection. Pass several assemblies if the value objects live in more than one.