Skip to content

Commit

Permalink
Clarified reading and writing in ConvertUsing docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshClose committed Apr 13, 2018
1 parent 578c86f commit b61e3dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs-src/src/pages/mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ Map( m => m.Name ).TypeConverter<MyConverter>();

Specifies an expression to be used to convert a field to a member, or a member to a field.

Reading:

```cs
// Convert to member
Map( m => m.Aggregate ).ConvertUsing( row => row.Get<int>( "A" ) + row.Get<int>( "B" ) );
Expand All @@ -177,7 +179,11 @@ Map( m => m.Aggregate ).ConvertUsing( row =>
var b = row.Get<int>( "B" );
return a + b;
} );
```

Writing:

```cs
// Convert to field
Map( m => m.Aggregate ).ConvertUsing( m => $"A + B = {m.A + m.B}" );

Expand Down

0 comments on commit b61e3dd

Please sign in to comment.