ma with "order" in its name. //if(t.Schema.Equals("dbo", StringComparison.InvariantCultureIgnoreCase) && t.NameHumanCase.ToLowerInvariant().Contains("order")) // return false;
return true; }; // Stored Procedures ****************************************************************************************************************** // Use the following regex filters to include or exclude stored procedures
StoredProcedureFilterExclude = null; StoredProcedureFilterInclude = null; // Filtering of stored procedures 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 stored procedure, return false to exclude it.
StoredProcedureFilter = (StoredProcedure sp) => { // Example: Exclude any stored procedure in dbo schema with "order" in its name. //if(sp.Schema.Equals("dbo", StringComparison.InvariantCultureIgnoreCase) && sp.NameHumanCase.ToLowerInvariant().Contains("order")) // return false;
return true; }; // Table renaming ********************************************************************************************************************* // Use the following function to rename tables such as tblOrders to Orders, Shipments_AB to Shipments, etc. // Example:
TableRename = (string name, string schema, bool isView) => { // Example //if (name.StartsWith("tbl")) // name = name.Remove(0, 3); //name = name.Replace("_AB", ""); //if(isView) // name = name + "View"; // If you turn pascal casing off (UsePascalCase = false), and use the pluralisation service, and some of your // tables names are all UPPERCASE, some words ending in IES such as CATEGORIES get singularised as CATEGORy. // Therefore you can make them lowercase by using the following // return Inflector.MakeLowerIfAllCaps(name); // If you are using the pluralisation service and you want to rename a table, make sure you rename the table to the plural form. // For example, if the table is called Treez (with a z), and your pluralisation entry is // new CustomPluralizationEntry("Tree", "Trees") // Use this TableRename function to rename Treez to the plural (not singular) form, Trees: // if (name == "Treez") return "Trees";
return name; }; // Column modification***************************************************************************************************************** // Use the following list to replace column byte types with Enums. // As long as the type can be mapped to your new type, all is well. //EnumsDefinitions.Add(new EnumDefinition { Schema = "dbo", Table = "match_table_name", Column = "match_column_name", EnumType = "name_of_enum" }); //EnumsDefinitions.Add(new EnumDefinition { Schema = "dbo", Table = "OrderHeader", Column = "OrderStatus", EnumType = "OrderStatusType" }); // This will replace OrderHeader.OrderStatus type to be an OrderStatusType enum // Use the following function if you need to apply additional modifications to a column // eg. normalise names etc.
UpdateColumn = (Column column, Table table) => { // Rename column //if (column.IsPrimaryKey && column.NameHumanCase == "PkId") // colu |