|
1 | 1 | CodeGenerator |
2 | 2 | ============= |
3 | | - |
| 3 | +Description: |
| 4 | +-------------- |
4 | 5 | Generates Stored Procedure for Oracle and Sql Server database, Data Access Layer Code and Entity classes |
| 6 | + |
| 7 | +Requirements: |
| 8 | +-------------- |
| 9 | +.Net Framework 3.5 SP1 (WPF) |
| 10 | +Oracle Client if you want to generate code from Oracle Database |
| 11 | + |
| 12 | +Configuration: |
| 13 | +-------------- |
| 14 | +Open the app.config file, update the following information: |
| 15 | +1) value="SqlServer" if sql server database or value="Oracle" if oracle database |
| 16 | + <add key="ConString" value="SqlServer"/> |
| 17 | +2) Put the name/code of your project in place of STS |
| 18 | + <add key="ProjectName" value="STS"/> |
| 19 | +3) If SqlServer then following config block will be application |
| 20 | + <!--For Sql Server Database--> |
| 21 | + <add key="ConString_SqlServer" value="Provider=sqloledb;Data Source=PC69;Initial Catalog=STS;User Id=sa;Password=sa1234;" /> |
| 22 | + <add key="PkColName" value="intPK"/> |
| 23 | + <add key="RecordCreatorColName" value="IUser"/> |
| 24 | + <add key="RecordModifierColName" value="EUser"/> |
| 25 | + <add key="RecordCreateDateColName" value="IDate"/> |
| 26 | + <add key="RecordModifiedDateColName" value="EDate"/> |
| 27 | + |
| 28 | + Else if Oracle the following config block will be application |
| 29 | + <!-- For Oracle Database --> |
| 30 | + <add key="ConString_Oracle" value="Provider=OraOLEDB.Oracle;Data Source=tvl;User ID=wims_p4;Password=wims_p4;" /> |
| 31 | + <add key="PkColName" value="NUMID"/> |
| 32 | + <add key="RecordCreatorColName" value="STRUID"/> |
| 33 | + <add key="RecordModifierColName" value="STRLASTUID"/> |
| 34 | + <add key="RecordCreateDateColName" value="DTUDT"/> |
| 35 | + <add key="RecordModifiedDateColName" value="DTLASTUDT"/> |
| 36 | + |
| 37 | + update the ConString with your projects Connection String Property |
| 38 | + |
| 39 | + the value of "PkColName" key will be the primary key column name of your table |
| 40 | + the value of "RecordCreatorColName" key will be the Record Creator's column name of your table |
| 41 | + the value of "RecordModifierColName" key will be the Record Modifier's column name of your table |
| 42 | + the value of "RecordCreateDateColName" key will be the Record Creation timestamp column name of your table |
| 43 | + the value of "RecordCreateDateColName" key will be the Record Modification timestamp column name of your table |
| 44 | + |
| 45 | + usually all the above 5 columns name should be unique in all tables of your database |
| 46 | + |
| 47 | +Run: |
| 48 | +----- |
| 49 | +Then run the Project/EXE all tables of your connected database will available in the Drop down list |
| 50 | +Select 1 table and click on the buttons to generate the Code for you. |
| 51 | +The generated files will available at the path defided in |
| 52 | + <add key="SaveDirectoty" value="D:\\CodeGeneratorFiles\\" /> |
| 53 | + |
| 54 | +Happy Coding!!! |
| 55 | +Fast Coding!!! |
0 commit comments