-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse Engineer: Cmd parameter to disable naming logic #6018
Comments
A lot of people have been asking for this, so we should try to do it for 2.0. |
In the previous version, I used the solution proposed by natemcmaster for regenerate my model https://gist.github.com/natemcmaster/353f4ab3efb4514eeaec846df28f0e24, In the next version I used a modified version proposed by But now with the last version nothing of the two works, who can I regenerate my model for disable name-changing logic. |
@JuanIrigoyen - Solution posted by Nate should still work. |
@ajcvickers @smitpatel @bricelam @divega Do we need to design this? I was getting going on a simple boolean flag |
@lajones can we bring this to the design meeting tomorrow? On first thought I like the idea of adding a very simple flag that maps directly to what seems to be a common need, e.g. Bringing your own naming service already requires coding the service (or at least installing a NuGet package containing it), so I think it might be ok for that scenario to always require some tinkering with design time services. But even if we later decide to do something in the command line to allow specifying custom naming services it won't necessarily obsolete the flag: We would just need to decide what happens when the user BTW, Rowan mentioned in the original post that there we should decide whether the non-PascalCase option should still do some sanitization to land on valid C# identifiers. I tend to believe it should. Then maybe it makes sense to pass the state of the --no-pascal-case flag in the |
Discussed in design mtg today. Outcome: we will use the simple boolean flag There was also the suggestion that we move the existing singularize/pluralize step to before the uniquify step (currently it's after and though we haven't come across issues with this they are theoretically possible). |
Did anybody see fieldnames are still Pascalcased? |
@piyey Can you file a new issue with full details if the flag is not doing what you expect? |
Ok @ajcvickers , I will search if someone else reported this issue. |
Hi @piyey, did we file an issue for this, I can confirm the flag does not activate the feature? (i.e. field names are still PascalCased) |
We have the ability to create a custom service that handles column => property naming (see https://gist.github.com/natemcmaster/353f4ab3efb4514eeaec846df28f0e24). However, some folks may want to opt out of our default logic and just have property names line up with column names. We think this makes sense to have as a top level parameter to the commands.
BTW we should have a design discussion about whether this literally just uses the column name, or makes some basic attempts to land with a valid C# identifier.
The text was updated successfully, but these errors were encountered: