Skip to content

Commit

Permalink
Enhance README to Highlight Custom Map Ability (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
say25 authored Dec 1, 2020
1 parent ec94abb commit b673673
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private async Task<ulong> WriteToDatabaseAsync(PostgreSQLCopyHelper<TestEntity>
}
```

## PostgreSQLCopyHelper Custom Type Maps ##

One can always define a custom map function for any property to any `Npgsql` type.

For example:

```csharp
.Map("geo", x => x.geo, NpgsqlDbType.Point)
```

## PostgreSQLCopyHelper.NodaTime: NodaTime Support ##

The [PostgreSQLCopyHelper.NodaTime](https://www.nuget.org/packages/PostgreSQLCopyHelper.NodaTime/) package extends PostgreSQLCopyHelper for [NodaTime](https://nodatime.org/) types.
Expand All @@ -149,9 +159,7 @@ NpgsqlConnection.GlobalTypeMapper.UseNodaTime();
conn.TypeMapper.UseNodaTime();
```

For more details see the Npgsql documentation:

* [https://www.npgsql.org/doc/types/nodatime.html](https://www.npgsql.org/doc/types/nodatime.html)
For more details see the [Npgsql documentation for NodaTime](https://www.npgsql.org/doc/types/nodatime.html).

## Case-Sensitive Identifiers ##

Expand Down

0 comments on commit b673673

Please # to comment.