EntityFramework-Reverse-POCO-Code-First-Generator
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard
Prepend schema name without underscores (or control the pre-pend naming)
Hi,
I am working on another small project, where the tabels are split into multiple schemas. The class names are prepend with the schema name using the setting below, but it has underscore between the two names. Also is there a way to change the schema name from DbName to NameHumanCase? I need to control the casings.
Thanks
// Schema *****************************************************************************************************************************
// If there are multiple schemas, then the table name is prefixed with the schema, except for dbo.
// Ie. dbo.hello will be Hello.
// abc.hello will be AbcHello.
Settings.PrependSchemaName = true; // Control if the schema name is prepended to the table name
Hi @FaizulHussain
Its in a few places within EF.Reverse.POCO.v3.ttinclude
search for Settings.PrependSchemaName and change the line below to suit your needs.
Thanks for the tip.
I didn't wanted to modify this file, but found a workground within the Database.tt file. Set the config Settings.PrependSchemaName to false, and within the TableRename delegate concatenate the name to suit need :)
I have noticed two of my tables have names with the "s" suffix removed. For instance, the table "IdvProfileStatus" gets renamed to "IdvProfileStatu". Is this something to do with the plurization service? Anyway I can control this? I tried to have the name set within the TableRename delegate but it still gets changed. So I guess there is two isues, one is there away to update the plurization, and (2) Overriden names within TableRename should not get overriden
Thanks