05/25/2014 UPDATE: I moved the code to a different project. I have made a number of changes since 2012.

11/14/2015 UPDATE: I moved my whole repository from GoogleCode to GitHub because GoogleCode shut down.

My Simple Class Creator is now available for download via SVN, click on the following link:
https://github.com/dyslexicanaboko/dyslexic-code/tree/master/SimpleClassCreator

Let Me Reiterate

Like I have explained before, this program is NOT intended to replace an ORM – the purpose of this program is to help people quickly model tables or queries (virtual tables) in a database. You can quickly create classes/objects for something you want to work with or manipulate without having to work with DataTables directly.

Realistically – who wants to write the basics of a class anymore – it is mundane annoying work. Hence why I wrote this program, I no longer write classes from scratch if they already exist in a table or as a query in the database.

Feel free to download or browse the code here:
https://github.com/dyslexicanaboko/dyslexic-code/tree/master/SimpleClassCreator

Features

  • Use either a Table Name or a Query to generate your code
  • Supports C# and VB.Net code generation
  • Supports WCF Attribute Tags
  • Choice of building out or using short hand for Properties – C# only
  • Choice of including a prefix for private class members – IE: _name vs. m_name
  • If you are generating this class from a single table then full starter CRUD is generated, otherwise just a generation method is created where a DataTable can be passed in and a List of your object is returned.

Why would I want to use this?

Well I don’t know about you – but I hate writing class definitions, it is boring work. I also have to work in two languages, I use C# and VB.Net simultaneously so it helps to be able to generate either type of object from the same database without having to be dependent on a strict ORM. My templates are over simplified so nothing crazy is happening in the background, no contexts, the class generated is single tier POCO.

For the Potential Haters

For the people who want to tear apart my code because of my approach – don’t bother me with your opinion because I don’t care – I am serious. This is very simply for MODELING. So in other words if you don’t like the approach DON’T USE IT. I will be upfront and say it is not efficient, but I don’t care because this program is not running in a loop, it is running for less than a second to generate a class. I have saved hours of work by using this program and I am not tied down to an ORM.

Leave a Reply

Your email address will not be published. Required fields are marked *