AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

Add property for naming conventions to the CSLA / PLINQO NHibernate and PLINQO EF templates #648

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
One currently has to follow these steps to change the default entity naming 
conventions. This should be moved to a property on the hbm / edmx and entities 
templates..

1.  Download the nightly build (http://community.codesmithtools.com/nightly/).
2.  Right click the zip and select the properties menu item from the context 
menu.
3.  Click the unblock button. Then select apply and close the properties window.
4.  Extract the latest nightly build file.
5.  Edit the Edmx.cst file under the (Plinqo EF\CSharp) directory.
6.  Add the following two properties at line 103.
Configuration.Instance.NamingProperty.AssociationTypeNameSuffix = 
AssociationSuffix.Singular;
            Configuration.Instance.NamingProperty.AssociationSuffix = AssociationSuffix.Plural;

7.  Save the Edmx.cst.
8.  Execute the QuickStart.cst.
9.  Select the Source Database. Leave all other properties at default.
10. Open the Location directory and make sure it is empty (no edmx file).
11. Click the Generate button.
12. Open the .sln with visual studio.
13. Rebuild the .data project to generate the edmx.
14. Open the .edmx in designer.
15. Select an EntityType in designer.
16. Review properties 
    Entity Set Name
    Name
17. Entity Set Name is singular.
18. Name is singular.

Original issue reported on code.google.com by bniemyjski on 3 May 2012 at 3:00