What problem are you trying to solve?
I have a minimal reproduction repo for this problem: ChrisTorng/PostgreSqlCitext.
I'm using 4/6/2026 2.6.1465 version of EF Core Power Tools to do Reverse Engineering.
The Edit UI can only rename the function name testtext into TestText, not supporting the returned table's column names. Even with manual editing of BeforeFix/efpt.renaming.json:
{
"Columns": [
{
"Name": "resultcolumn",
"NewName": "ResultColumn"
}
],
"Name": "testtext",
"NewName": "TestText"
}
(it's easy now with the help of AI) to rename the returned table column, it doesn't work. The generated code in BeforeFix/TestTextModels/TestTextResult.cs:
public partial class TestTextResult
{
public string resultcolumn { get; set; }
}
And the manual editing of BeforeFix/efpt.renaming.json will be overridden by later Edit UI, deletes the content of Columns:
{
"Columns": [ ],
"Name": "testtext",
"NewName": "TestText"
}
Describe the solution you'd like
The Fixes
I've forked ErikEJ/EFCorePowerTools from chore: move sln to slnx (#3343) into my repo ChrisTorng/EFCorePowerTools. With the help of GitHub Copilot, I made some changes to make it works on my Visual Studio 2026 Insiders, easier to debug (cause I can't found other easier ways). And the fix is: Add Result class rename function. But it only works on Refresh. The manual editing of AfterFix/efpt.renaming.json doesn't survive after Edit UI.
The Results
The fixed version of EFCPT, Refreshing the AfterFix/efpt.config.json. The renaming result is in AfterFix/Models/TestTextResult.cs. The column name is now ResultColumn with [Column("resultcolumn")] attribute, instead of resultcolumn:
public partial class TestTextResult
{
[Column("resultcolumn")]
public string ResultColumn { get; set; }
}
No PR for original repo
Sorry it's hard for me to contribute a PR to the original repo, because of:
- These changes are made by GitHub Copilot mainly. I can understand some easier ones. But I can't fully understand the whole picture of EFCPT.
- I didn't drill down into how to unit test these changes, by EFCPT's own way.
- The renaming of returned table column names lacks Edit UI supports. I'm not sure whether you are willing to add this feature or not.
- I've changed many other files for local running/debugging. I believe these are not what you want.
- I'm not familiar of how GitHub/PR works.
Hope this fix helps EFCPT to support more renaming scenarios.
What problem are you trying to solve?
I have a minimal reproduction repo for this problem: ChrisTorng/PostgreSqlCitext.
I'm using 4/6/2026 2.6.1465 version of EF Core Power Tools to do Reverse Engineering.
The Edit UI can only rename the function name
testtextintoTestText, not supporting the returned table's column names. Even with manual editing ofBeforeFix/efpt.renaming.json:(it's easy now with the help of AI) to rename the returned table column, it doesn't work. The generated code in
BeforeFix/TestTextModels/TestTextResult.cs:And the manual editing of
BeforeFix/efpt.renaming.jsonwill be overridden by later Edit UI, deletes the content ofColumns:Describe the solution you'd like
The Fixes
I've forked ErikEJ/EFCorePowerTools from chore: move sln to slnx (#3343) into my repo ChrisTorng/EFCorePowerTools. With the help of GitHub Copilot, I made some changes to make it works on my Visual Studio 2026 Insiders, easier to debug (cause I can't found other easier ways). And the fix is: Add Result class rename function. But it only works on
Refresh. The manual editing ofAfterFix/efpt.renaming.jsondoesn't survive after Edit UI.The Results
The fixed version of EFCPT, Refreshing the
AfterFix/efpt.config.json. The renaming result is inAfterFix/Models/TestTextResult.cs. The column name is nowResultColumnwith[Column("resultcolumn")]attribute, instead ofresultcolumn:No PR for original repo
Sorry it's hard for me to contribute a PR to the original repo, because of:
Hope this fix helps EFCPT to support more renaming scenarios.