Meta Data Class Generator v1

by Frank Perez June 5, 2014

Completing my goal to update every product, I'm releasing the next version of MDG (Meta Data Class Generator) with the following features:

  • Installation Program
  • User Interface
  • SQL Compact Data
  • Digitally Signed

Installation Program

MDG now includes a real installation program. The installation program will automatically verify that all of the required components (Microsoft .NET Framework 4.5 and Microsoft SQL Server Compact 4.0) exist. If a required component doesn't exist, the installation program will download and install it.

User Interface

MDG now includes a user interface. The user interface simplifies the setup process and makes interacting with MDG easier.

Project List

The Project List is the main form. This form displays the current status of every project and is used to perform project maintenance (new, edit, delete).

Toolbar

  • New Project: displays the Project Maintenance with a new project.
  • Edit Project: displays the Project Maintenance form for the selected project.
  • Delete Project: permanently deletes the selected project.

Project Maintenance

The Project Maintenance form is used to define the project settings. This form includes the ability to test the settings and to perform the Meta Data Class generation process.

Settings

  • Project Settings: all settings are required.
  • Database Settings: all settings are required.
  • Class Settings: all settings are required.

Test Button

The Project and Database settings include a Test button.

Run Tool Button

The Run button is used to perform the Meta Data Class generation process.

SQL Compact Data

MDG now stores the project information in a SQL Compact 4.0 Database. The database is located in the Common Program Data folder. On a Windows 7 PC, this equates to C:\ProgramData\PF Solutions\Meta Data Class Generator\.

Digitally Signed

All of the MDG EXE and DLL files are now digitally signed.


Links:
Download http://pfsolutions-mi.com/Product/MetaDataClassGenerator

Keywords:

Filed Under: .NET | MDG

MetaData Class Generator v0.1.0.0

by Frank Perez August 23, 2012

Since my first ASP.NET MVC, I've always used the Data Annotation Model Binder to perform simple validations like the following:

  • Range – validate whether the value of a property falls between a specified range of values.
  • Regular Expression – validate whether the value of a property matches a specified regular expression pattern.
  • Required – mark a property as required.
  • String Length – specify a maximum length for a string property.

The problem is that if you like to design "Database First" like me, it can take a significant amount of time to build all of the classes later. Since I'm the kind of person who hates tedious work, I created my own utility for building the classes called MetaData Class Generator. MetaData Class Generator is a console application for generating Data Annotation classes based on an existing SQL Server Database.

If you would like a copy of this application, you can download the latest version using the link below. The following is a list of important notes:

  • This application requires the Microsoft .NET Framework 4 Client Profile.
  • This application has only been tested with SQL Server 2008 R2. Other versions may work, but there could be issues mapping newer data types.
  • Be sure to read the README.TXT file for instructions on running the application.
  • I'd love to hear any feedback. What do you like, what do you not like, what kind of features would you like to see in future versions?


Links:
Download MetaData Class Generator http://pfsolutions-mi.com/Product/MetaDataClassGenerator
Using Data Annotations for Model Validation http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-6
Microsoft .NET Framework 4 Client Profile http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5765d7a8-7722-4888-a970-ac39b33fd8ab

Keywords:

Filed Under: .NET | MDG

About Frank

Frank lives in West Bloomfield, Michigan with his wife and three children.  When he is not writing code, he enjoys long distance running and riding his motorcycle.

Month List

Tag Cloud