Wednesday, April 28, 2010

Three tire code Generator for C#.NET

Download the toolOr


  1. Select Table Tab to get the tables for your ConnectionString.
  2. Enter your connection string.
  3. Press to get the tables for your ConnectionString.
  4. After pressing the button Load Tables the tables are loaded. When selecting a table it focus on the Conditions tab and all the column and DataType are loaded automatically in 9, 10, 10.1.
  5. Conditon tab to specify the property and field prefix.
  6. Namespace for your class.
  7. Name of your property class.
  8. Name of your data access layer class.
  9. Enter your table name. This helps to produce the sp name. For Select method it creates spname as GetTableName.
  10. Table column name along with DataType.
  11. 10.1. Get distinct of DataType from 10.
  12. Clear all the controls.
  13. For each datatype in 10.1 we are generating a textbox to enter the prefix for the DataType.
  14. For each data-type you want to specify a separate prefix check it. For exampele for string specify str. Your field will be created like strUserID. The panel will be enabled and enter it.
  15. By default the field names are generated with underscore (_). If you want to change give a new one.
  16. Enter the prefix for the fields. This will be enabled by checking Is prefix required for fields.
  17. For properties some of us specify pUserID. If you want to specify enter it by check the checkbox of is prefix required for properties.
  18. To genereate the Data Tire Classes.
  19. If your get procedure contains any parameter check the select.
  20. If your Delete procedure contains any parameter check the select.
  21. Select the column names. These are the parameters for procedure Insert and Update.
  22. This is single select. This column will be your direction. For all the four procedures.
  23. Select your ParameterDirection
  24. Select your ParameterDirection.
  25. Select your ParameterDirection.
  26. Select your ParameterDirection.
  27. If you are using SQLHelper class check it. The code generated accordingly.
  28. If you want to save the calsses as file check it. It opens a folder dialogue to select a path where to store the class files.
  29. After select you can view the selected path.
  30. The tab Properties contains a class with properties.
  31. The tab DAL contains a class with functions for calling Select, Insert, Delete Update procecures.
  32. The tab SQLHelper contains a class with functions for calling Select, Insert, Delete Update procecures. This class uses SQLHelper.cs

Happy Coding.

No comments: