Closed bdelmeire closed 2 years ago
Since this is a potentially breaking change, I'll add it to v6, which will be based on EF Core 6.
@bdelmeire I am working to merge your PR. The only change I'd like to make is to support both the old and new versions of AddHandlebarsTransformers
. I'll update this PR accordingly and then merge.
This PR allows access to entity type from transform functions. Example of use : rename all primary keys ‘TableNameId’ to ‘Id’
services.AddHandlebarsTransformers(propertyTransformer: (e, p) => $"{e.Name}Id" == p.PropertyName ? new EntityPropertyInfo(p.PropertyType, "Id", false) : new EntityPropertyInfo(p.PropertyType, p.PropertyName, p.PropertyIsNullable));