Skip to content
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

Enhancement: Option to customize the "Result" suffix appended when generating type names #2677

Open
vanillabrian opened this issue Nov 28, 2024 · 7 comments
Labels

Comments

@vanillabrian
Copy link

This enhancement would allow slight customization of the default return type name. We have a large amount of code written with an older version of EF and the return type names were generated slightly differently. To ease the transition to EF Core it would be nice if the type names could be generated to match the ones previously generated to minimize code changes.

Currently, the return type names generated for store procedures and functions are generated by appending the suffix "Result" to the name of the procedure or function name. The return type for the procedure sp_ProcessSomeData would be sp_ProcessSomeDataResult.

The proposal is to add an option, Type Name Suffix, to the Advanced Options dialog windows to specify a customized suffix instead of the default 'Result". If nothing is specified 'Result' would be used as it is in the current version. So, if "_Result" was specified as the Type Name Suffix the return type name for the procedure mentioned above would be sp_ProcessSomeData_Result.

image

I have already implemented a proof of concept. Would you be open to a pull request?

@ErikEJ
Copy link
Owner

ErikEJ commented Nov 28, 2024

I think it is a good suggestion - but I think this could just be something you can manually add to the config file. Remember to also add to the CLI (or I can do that after your PR if you prefer)

@vanillabrian
Copy link
Author

Ok, I will test with the CLI.

@ErikEJ
Copy link
Owner

ErikEJ commented Nov 28, 2024

Cool. Testing with the CLI is very simple.

@vanillabrian
Copy link
Author

By the way, for a PR should I include updated zip files (efptxx.exe.zip & efrevengxx.exe.zip) or just the source code changes?

@ErikEJ
Copy link
Owner

ErikEJ commented Nov 28, 2024

Just the updated source code, the .zip files are always built in the github action

@ErikEJ ErikEJ added enhancement New feature or request reveng reveng-cli labels Nov 29, 2024
@ErikEJ
Copy link
Owner

ErikEJ commented Dec 8, 2024

@vanillabrian Is this still something you plan to work on?

@vanillabrian
Copy link
Author

Yes, I still plan to work on this. I was delayed by some other priorities, but I am hoping to submit a PR as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants