Skip to content

Conversation

@gpender
Copy link

@gpender gpender commented Dec 15, 2021

When using Transform mappings, and UseDataAnnotations=false, provide .ToTable and .HasColumnName methods in the generated context when table and column names are different to the entity and property names.

When using Transform mappings, and UseDataAnnotations=true, use ColumnAttribute in generated entities and do not use .ToTable and .HasColumnName methods in the context.

Closes #188.

@tonysneed
Copy link
Contributor

tonysneed commented Dec 18, 2021

@gpender The PR looks good overall. One issue I found is that .HasKey need to be appended to .ToTable because renaming the PK can result in a deviation from the standard key naming convention.

I'll work on resolving this issue.

@tonysneed tonysneed merged commit 2a50b3a into TrackableEntities:master Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Generated entity ToTable and Property in generated OnModelCreating lack table and column mappings when Handlebars transformers are used

2 participants