The code generated with the default templates adds a "My" prefix in the file/class name in "EntitySubClasses" folder.
Changed the templates to use just the Entityname (More details below). E.g., In "derivedEntityAdapter.template" file, changed
"My<[CurrentEntityName]>Entity"
to
<[CurrentEntityName]>
The file/class name in the "EntitySubClasses" folder now use the same name as the table in the database.
Any feedback on this approach would be greatly appreciated (like problems when template structure changes in future versions, any other better approach etc.)
Thanks in advance!
================
More Details:
Environment:
SQL Server 2000 SP3, Microsoft .Net Framework 2.0, Using Remoting
LLBLGenPro v2.0.0.0 Release Date 27-nov-2006
Preset: SD.Presets.AdapterTwoClasses2005
Change Description:
Using the default templates out-of-the-box, the generated code in EntitySubClasses folder has:
FileName: MyCustomerEntity.cs
Class name: public partial class MyCustomerEntity : CustomerEntity, ISerializable
Removed "My" prefix and "Entity" suffix in the following templates so that the generated code uses the database table name for file/class name in "EntitySubClasses" folder.
Template Files Affected:
Folder: C:\Program Files\Solutions Design\LLBLGen Pro v2.0\Templates\SharedTemplates\Net2.x\C#
Files:
- SD.Presets.Adapter.TwoClasses2005.preset
- derivedEntityAdapter.template
- derivedEntityFactoriesAdapter.template
- entityUsingDerivedAdapter.template
- inheritanceInfoProviderDerived.template
Change Details:
My[elementName]Entity.[extension] Changed to [elementName].[extension]
My<[CurrentEntityName]>Entity Changed to <[CurrentEntityName]>
My<[RelatedEntityName]>EntityFactory() Changed to <[RelatedEntityName]>Factory()