Generic converter bounding in EF Core
Is there an way to "easily" define converters for all properties which uses an generic type? Currently, I have something like this:
and an ugly static method that gets all properties from entities, map eachs one and applies the converter using reflection and activator.
1 Reply
currently, i'm using this:
but that doens't seems correct. each entity has an strong typed ID
EntityId<TEntity>
, and I want to map all of them for all entities.
so, what's the better way to create an converter for all EntityId<>
without using reflection and activator?