RSS Feed




More...



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 blogger, author and a Kundalini Yogi who writes about apparently unrelated topics - Yoga & technology! A former Software Consultant by profession, Bipin is programming since 1995 and is working with .NET framework ever since its inception. He was a well known technology author, trainer and an active member of Microsoft developer community before he decided to take a backseat from the mainstream IT circle and dedicate himself completely to spiritual path. Having embraced Yoga way of life he now codes for fun and writes on his websites. You can read more about him here.


Associated Links
Download Code Generator

Tags : Windows Forms Utilities
Posted On : 28 Nov 2006
Current Rating :
Rate this product :


This page is protected by copyright laws. Copying in any form is strictly prohibited. For Copyright notice and legal terms of use click here.

Protected by Copyscape


Copyright (C) binaryintellect.net. All rights reserved.
Contact Us
Read Copyright & Terms Of Use
Hosted By ORCS Web