Click here to Skip to main content
13,589,271 members
Click here to Skip to main content
Add your own
alternative version


28 bookmarked
Posted 26 Jun 2016
Licenced CPOL

C# SmartBuilder- A Tool to auto generate Classes (Info,Controller, Provider)

, 27 Jun 2016
Rate this:
Please Sign up or sign in to vote.
Choose your datasource and generate classes


Git Hub :

This is a small open source tool (still in development), built with the implementation of a few WinForm UI controls from the CodeProject itself.

This tool will help C# developers save time while they generate their Info, Controller and Data Provider Classes directly from a data  source (MS-SQL for now). In later phases, i am planning to integrate (NoSQL, Text Files ,JSON Files, CSV Files, Excel Files, Service API ) sources as well. You are free to join and upgrade this utility if you are interested. This tool, itself is built with helps from a lot of good and intelligent mentors.

At first i had no idea on what to include and what not to, hence the code is not so well managed(No design patterns, no code commenting for now, no unit testing ). We will be following the Repository Pattern and the Managed Extensibility Framework in the near future such that our tool becomes pluggable to many other source, but spare me for now.


Going through the database tables and writing down Info classes, Controllers and Providers for each table was a troublesome work and on top that too time consuming. Hence, i got an idea of making a utility tool to help me with such things. So, i did my research, collected resources and wrote some code, looked for some useful UI controls and then merged them all into this small utility which we have here.

Using the tool

Using the tool is as easy as:

1. Provide the Database Server Credentials

2. Test the Connection to the server

3. Select a database

3. Choose what to generate [ Table Infos , Multipe Table Infos ,  Stored Procedure Definitions ]

4. Enter your special requirements

5. Build [ Explore to the save directory to view the output or navigate to the fast note section ]

Here is what the input looks like:

Some data from the fast note explorer:

You can also set the info attributes from the Settings/Properties section as

You can browse to the folder and find the classes at your disposal :

Well, thats all we have for now. Feel free to explore the application and report any errors and bugs if found. You can join and contribute if you wish. We still have a long way to go.

Also, do give feedbacks, suggestions and further enhancement ideas such that it will be of great help to fellow developers while developing applications.

I have attached an executable and the source code along with this article. Now its yours to explore !!

Lastly, I would like to thank all devs for their contribution in building such awesome UI tools :D. Drop by and say Hi if you found your controls in action along with this tool.


Points of Interest

At the middle of the development phase, it just struck me. Why only MS SQL, why not all the other Data Sources?? All those (NoSQL databases, Excel exported datas, csvs , jsons and even Web APIs. We could do a whole lot of things with those as well. But it was too late to integrate. But i havent given up. In the near future we will be generating our classes from all those different type of sources as well. And i have already started working on it.


Inspired from CodeSmith and all those awesome tools out there.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Ozesh Thapa
Software Developer Braindigit IT Solution
Nepal Nepal
I am a Software Engineer and a developer by profession.

The following things describes me:
1. I am a real time/run time developer : Basically learn and implement things on the fly.
2. Definitely not a technology racist : Love to work and explore any technology that i come across.
3. Prefer Beer over H2O : Code with passion and for fun

I am interested in Research & Development based tasks, exploring, experimenting and trying out new things.
Technologies i have been using up until now are C#, ASP.NET, Win Services, Web Services, Restful Web API, Windows Application, Windows Phone Application, Store Apps, couple of JavaScript frameworks, Xamarin Forms, NodeJS, React, ReactNative, AngularJS, SQL Server, MongoDB, Postgres etc.

You may also be interested in...


Comments and Discussions

GeneralI like your thinking Pin
tonyhicks204-Jul-16 19:06
membertonyhicks204-Jul-16 19:06 
GeneralRe: I like your thinking Pin
Ozesh Thapa4-Jul-16 19:58
professionalOzesh Thapa4-Jul-16 19:58 
GeneralI love Nepal Pin
Pablo Odysseus28-Jun-16 20:15
memberPablo Odysseus28-Jun-16 20:15 
GeneralRe: I love Nepal Pin
Ozesh Thapa29-Jun-16 2:21
professionalOzesh Thapa29-Jun-16 2:21 
QuestionSqlite, please? Pin
FJ Bez27-Jun-16 0:13
memberFJ Bez27-Jun-16 0:13 
AnswerRe: Sqlite, please? Pin
Ozesh Thapa27-Jun-16 2:12
professionalOzesh Thapa27-Jun-16 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01 | 2.8.180615.1 | Last Updated 27 Jun 2016
Article Copyright 2016 by Ozesh Thapa
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid