如何阻止 EntityFramework Reverse POCO Generator 重命名列?

How to stop EntityFramework Reverse POCO Generator from renaming columns?

使用 EntityFramework Reverse POCO Generator v2.26.0,我找不到在哪里更改 .tt 以在生成 POCO 时停止列重命名。我怀疑它在 UpdateColumn 中,我已将其更新为单行:

UpdateColumn = (Column column, Table table) => column;

但是这些列仍然被重命名为例如"Batch_ID" 到 "BatchId".

在不停止列重命名的情况下,出现错误:

The data reader is incompatible with the specified 'DocumentExport.DataAccess.Databases.Batches.Batch'. A member of the type, 'BatchId', does not have a corresponding column in the data reader with the same name.

如何在POCO生成过程中停止列重命名?

在database.tt,

UsePascalCase = false;    // This will rename the generated C# tables & properties to use PascalCase. If false table & property names will be left alone.

虽然这实现了抑制列名称,但它也影响了 table 名称和可能的其他内容。