Reputation: 995
Using EntityFramework Reverse POCO Generator v2.26.0 and I cannot find where to change the .tt to stop the column rename when generating the POCOs. I suspect it is in UpdateColumn, which I've updated to just the single line:
UpdateColumn = (Column column, Table table) => column;
But still the columns get renamed from e.g. "Batch_ID" to "BatchId".
Without stopping the column rename, I'm getting the error:
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.
How does one stop column renaming during POCO generation?
Upvotes: 1
Views: 1053
Reputation: 995
In the database.tt,
UsePascalCase = false; // This will rename the generated C# tables & properties to use PascalCase. If false table & property names will be left alone.
While this accomplished suppressing column names, it also affected table names and possibly other things.
Upvotes: 4