Downloads What Is New? Contact Us Prior Events  
Home Contact Feedback Site Map
   
StoredProc2DotNET

About us
Services
Downloads
Customer Sign-In
Prior Events



 


StoredProc2DotNET:  Click here to Download Now!

How much .NET code are you writing today to fetch, update or delete data? If you think it is a bit too much, this is the utility that you need. StoredProc2DotNET identifies all stored procedures in a specified database and generates .NET source code that allows calling these stored procedures as methods of a class. Executing stored procedures now becomes a single line of code and eliminates the need to create SqlParameters, SqlCommands, SqlConnection etc. StoredProc2DotNet also integrates with Microsoft Data Access Application Block for connecting, retrieving and update data.

Microsoft Data Access Application Block for .NET consists of a single .NET-based assembly, which contains all the necessary functionality to perform most common data access tasks. By using the Data Access Application Block in your applications, you can minimize the data access code and ensure that your data access logic is implemented in an efficient, standardized and effective manner. If you were to call a Stored Procedure to GetEmployeeInfo, it would be:

//Retrieve the parameter set
SqlParameter[] storedParams = new SqlParameter[0];
storedParams = SqlHelperParameterCache.GetSpParameterSet(
ConnectionString ," GetEmployeeInfo ");
storedParams[0].Value = @tiid;

DataSet ds;
// Call ExecuteDataset static method of SqlHelper class that returns a Dataset
ds = SqlHelper.ExecuteDataset(ConnectionString, 
CommandType.StoredProcedure,
"GetEmployeeInfo ", 
storedParams);
Even through it is less code compared to the usual way of creating each parameter and Command it still has some things can can be painful to the developer. For example, rather than specifying each parameter separately, it requires that you remember the sequence of the parameters, remember the data type for each parameter and always know the exact stored procedure name. Also, it is still a few lines of code and if you have more than one parameter it can become much larger.

Using StoredProc2DotNET, it converts the above line into a single line and now our code becomes:
ds = StoredProcs.GetEmployeeInfo(1);
                

It gets the connection string from a config file and abstracts all CRUD functionality on your database.  You can  customize the connection string, class name and namespaces by changing the contents in the config file StoredProc2DotNET.exe.config. When you run the utility, it creates a C# file using the class name that you specify and places this file in the same folder where the exe exists. If you wish to create a VB .NET version of this file, please run it through the C# to VB .NET converter available at http://www.kamalpatel.net/ConvertCSharp2VB.aspx.

StoredProc2DotNET eliminates a lot of redundant code when accessing stored procedures from .NET and is a very valuable timesaver for any developer.

Note: StoredProc2DotNET requires you to have Microsoft Data Access Application Block on your machine. The latest version is available from http://msdn.Microsoft.com/architecture

Download the latest version of StoredProc2DotNET here and let us know what you think. Email: MiniS@ELLKAY.com

 

 

 

 

 


 
  
Copyright © 2003 ELLKAY, LLC. All rights reserved