Select property by name & set a converter using Fluent Mapping
See original GitHub issueHow can I use FluentMappingBuilder or EntityMappingBuilder to select a property by name (and optionally by type) and set a converter to like Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder does.
builder.Property("propertyName").HasConversion(personalDataConverter);
builder.Property(typeof(string), "propertyName").HasConversion(personalDataConverter);
builder.Property<string>("propertyName").HasConversion(personalDataConverter);
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Configure Property Mappings using Fluent API in EF Code- ...
The Fluent API can be used to configure properties of an entity to map it with a db column. Using Fluent API, you...
Read more >Fluent API - Configuring and Mapping Properties and Types
This article is designed to demonstrate how to use the fluent API to configure properties. The code first fluent API is most commonly ......
Read more >Value Conversions - EF Core
Configuring value converters in an Entity Framework Core model. ... Value converters allow property values to be converted when reading from ...
Read more >entity framework - C# EF6 conditional property selection?
I used System.Linq.Dynamic for this very successfully. You can pass a string as the select statement in the following format: .
Read more >Bindings (JavaFX 8)
Generates a bidirectional binding (or "bind with inverse") between a String - Property and another Property using the specified StringConverter for conversion.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
per-column converters for both attribute-based and fluent mappings will be available in next release https://github.com/linq2db/linq2db/wiki/Release-Notes-3.0.0#value-converters-2273
I think it covers remaining items from this issue
Oops my fault