C# DAL Generator for MySQL is a .net desktop application that generates C# Data Access Layer for MySQL database. The purpose of this application is to make software development easy. It creates C# classes (one per table) that contain methods for CRUD operations. The generated code can be used in web as well as desktop apps.
If you need C# Code Generator for SQL Server/MS Access then click here.
If you need Code Generator for Entity Framework (C#/VB.Net) then click here.
If you need PHP Code Generator for MySQL/MySQLi/PDO then click here.
Video DemoClick here to view the video demo.
- It creates C# classes (one for each table).
- Supports MySQL database.
- The class contains all columns of the table as properties.
- Data types have been handled nicely.
- Creates methods for CRUD operations.
- Sorting has been handled.
- Pagination has been handled.
- Primary key is automatically detected for each table.
- Composite primary key is supported.
- Nullable columns have been handled.
- Auto Increment column has been handled.
- Timestamp column has been handled.
- Completely indented code is generated.
- The generated code can be used in both desktop and web applications.
- All the following data types of MySQL are supported:
tinyint, smallint, mediumint, int, integer, bigint, decimal,
float, double, real, serial, bit, date, datetime, timestamp,
time, year, char, varchar, nvarchar, tinytext, text, mediumtext,
longtext, binary, varbinary, tinyblob, mediumblob, blob,
longblob, enum, set
- C# Class: For each table one C# class is created that contains all columns of the table as properties.
- Add Method: It is an instance method. It adds a new record to the relevant table. Nullable columns have been handled properly. Auto increment and timestamp columns are skipped while inserting a record. Relevant property of the auto increment column is populated after record is inserted.
- Update Method: It is an instance method. It updates an existing record. Auto increment and timestamp columns are skipped while updating a record.
- Delete Method: It is a static method. It deletes an existing record. It takes primary key columns values as parameters.
- Get Method: It is a static method. It gets an existing record (an instance of the class is created and all properties are populated). It takes primary key columns values as parameters.
- GetAll Method: It is a static method. It gets all records of the relevant table. You can also specify search columns. If sorting/pagination is enabled then the relevant code will also be generated.
Sample Application:A sample web application has also been provided that is using the generated code. In this application one form (for employees) has been created. This app uses the generated data access layer without modifying a single line in the generated code.
Updates HistoryUpdate 1 (Version 1.1):
Upgraded the app to .Net 4.6.1.