December 2017 : Online courses in ASP.NET MVC and Angular 4. Conducted by Bipin Joshi. Read more...
Registration for December 2017 batches of ASP.NET MVC / Core and Angular 4 online courses have already started. Conducted by Bipin Joshi. Book your seat today ! Click here for more details.

BinaryIntellect Code Generator (Beta)

BinaryIntellect code generator is a handy tool that automatically generates T-SQL script and C# code for Insert Update, Delete, Select All, Select By Primary Key, Select By Foreign Key and Delete By Foreign Key stored procedures. 100% of the code generated by the tool is available for you to include in your projects. No dependency or hidden strings attached! By default the generated code uses an in-built data access class. However, with a very little modification it can be made to use Microsoft Data Access Application Block. The tool will be available absolutely FREE of cost after the final release.

Features

BinaryIntellect code generator is a handy tool that automatically generates T-SQL script and C# code for the following stored procedures:
  • Insert
  • Update
  • Delete
  • Select All
  • Select By Primary Key
  • Select By Foreign Key
  • Delete By Foreign Key

100% of the code generated by the tool is available for you to include in your projects. No dependency or hidden strings attached! By default the generated code uses an in-built data access class. However, with a very little modification it can be made to use Microsoft Data Access Application Block. The tool will be available absolutely FREE of cost after the final release.

Known limitations and issues

The Beta version of the tool has following known limitations and issues:

  • Table and column names with white spaces are not supported
  • Foreign key constraint must be named as <anyname>_<name_of_the_parent_table>. This is how SQL Server creates them by default. It must end with "_" character followed by the name of the parent table.
  • The tool works only with SQL Server databases
  • Currently code is generated only in C#
  • Only single column primary keys are supported
  • Only single foreign key supported while generating "Select By FK" and "Delete By FK" procedures 

Features that will be added in the final version 

We plan to include the following additional features in the final release :

  • Support for VB.NET code generation
  • Support for table and column names with white spaces

Help us make it better

The BinaryIntellect Code Generator is still in beta stages. We will be releasing the final version soon. You can help us make it better by downloading and trying it out. Kindly send us any bugs, errors or suggestions here.  Also, if you feel that the tool is useful to developers like you then tell your friends about it.

Sample T-SQL generated by the tool

create procedure EmployeesAdd(@FirstName varchar(50),
@LastName varchar(50))
As
insert into Employees(FirstName,LastName)
values(@FirstName,@LastName)
Go
create procedure EmployeesModify(@EmployeeID int,
@FirstName varchar(50),@LastName varchar(50))
As
update Employees set FirstName=@FirstName,LastName=@LastName where EmployeeID=@EmployeeID
Go
create procedure EmployeesRemoveByPK(@EmployeeID int) 
As
delete from Employees where EmployeeID=@EmployeeID
Go
create procedure EmployeesGetAll 
As
select * from Employees
Go
create procedure EmployeesGetByPK(@EmployeeID int) 
As
select * from Employees where EmployeeID=@EmployeeID
Go

Sample C# Code generated by the tool

using System;

using System.Data;

using System.Data.SqlClient;

 

namespace Company.HR

{

public class Employees

{

public static int Add(string FirstName,string LastName)

{

SqlParameter[] p=new SqlParameter[2];

p[0]=new SqlParameter("@FirstName",FirstName);

p[1]=new SqlParameter("@LastName",LastName);

return SqlHelper.ExecuteNonQuery("EmployeesAdd",p);

}

 

public static int Modify(int EmployeeID,
string FirstName,string LastName)

{

SqlParameter[] p=new SqlParameter[3];

p[0]=new SqlParameter("@EmployeeID",EmployeeID);

p[1]=new SqlParameter("@FirstName",FirstName);

p[2]=new SqlParameter("@LastName",LastName);

return SqlHelper.ExecuteNonQuery("EmployeesModify",p);

}

 

public static int RemoveByPK(int EmployeeID)

{

SqlParameter[] p=new SqlParameter[1];

p[0]=new SqlParameter("@EmployeeID",EmployeeID);

return SqlHelper.ExecuteNonQuery("EmployeesRemoveByPK",p);

}

 

public static DataTable GetAll()

{

System Requirements

  • .NET Framework 2.0
  • Access to SQL Server database for which the code is to be generated

Installation Instructions


Bipin Joshi is a software consultant, an author and a yoga mentor having 22+ years of experience in software development. He also conducts online courses in ASP.NET MVC / Core and Design Patterns. He is a published author and has authored or co-authored books for Apress and Wrox press. Having embraced the Yoga way of life he also teaches Meditation and Mindfulness to interested individuals. To know more about him click here.

Get connected : Twitter  Facebook  Google+  LinkedIn

Posted On : 28 November 2006


Tags : Windows Forms Utilities