hese namespaces to specify where the different elements now live. These may even be in different assemblies. // Please note this does not create the files in these locations, it only adds a using statement to say where they are. // The way to do this is to add the "EntityFramework Reverse POCO Code First Generator" into each of these folders. // Then set the .tt to only generate the relevant section you need by setting // ElementsToGenerate = Elements.Poco; in your Entity folder, // ElementsToGenerate = Elements.Context | Elements.UnitOfWork; in your Context folder, // ElementsToGenerate = Elements.PocoConfiguration; in your Maps folder. // PocoNamespace = "YourProject.Entities"; // ContextNamespace = "YourProject.Context"; // UnitOfWorkNamespace = "YourProject.Context"; // PocoConfigurationNamespace = "YourProject.Maps"; // You also need to set the following to the namespace where they now live:
PocoNamespace = ""; ContextNamespace = ""; UnitOfWorkNamespace = ""; PocoConfigurationNamespace = ""; // 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.
PrependSchemaName = true; // Control if the schema name is prepended to the table name // Table Suffix *********************************************************************************************************************** // Prepends the suffix to the generated classes names // Ie. If TableSuffix is "Dto" then Order will be OrderDto // If TableSuffix is "Entity" then Order will be OrderEntity
TableSuffix = null; // Filtering ************************************************************************************************************************** // Use the following table/view name regex filters to include or exclude tables/views // Exclude filters are checked first and tables matching filters are removed. // * If left null, none are excluded. // * If not null, any tables matching the regex are excluded. // Include filters are checked second. // * If left null, all are included. // * If not null, only the tables matching the regex are included. // For clarity: if you want to include all the customer tables, but not the customer billing tables. // TableFilterInclude = new Regex("^[Cc]ustomer.*"); // This includes all the customer and customer billing tables // TableFilterExclude = new Regex(".*[Bb]illing.*"); // This excludes all the billing tables //
// Example: TableFilterExclude = new Regex(".*auto.*"); // TableFilterInclude = new Regex("(.*_FR_.*)|(data_.*)"); // TableFilterInclude = new Regex("^table_name1$|^table_name2$|etc"); // ColumnFilterExclude = new Regex("^FK_.*$");
SchemaFilterExclude = null; SchemaFilterInclude = null; TableFilterExclude = null; TableFilterInclude = null; ColumnFilterExclude = null; // Filtering of tables using a function. This can be used in conjunction with the Regex's above. // Regex are used first to filter the list down, then this function is run last. // Return true to include the table, return false to exclude it.
TableFilter = (Table t) => { // Example: Exclude any table in dbo sche |