What is NSprocs?

In short, NSprocs is a code generator that creates glue code between database stored procedures and your .NET code. Normally, to call a stored procedure from .NET, you'd need to create and open a connection, construct a command, fill out parameters, and finally run the command. NSprocs generates this code for you, so that calling any stored procedure in your database can be done with a single line of code.

It's worth noting that NSprocs is not an ORM layer; NSprocs-generated methods cannot return anything more structured than a dataset.

Why use NSprocs?

NSprocs provides three key benefits:

Who is NSprocs for?

For Microsoft Visual Studio.NET 2005 developers building applications that must access their database through stored procedures, or would like to.

How do I use NSprocs?

Start off by writing your stored procedures. Use just about any SQL Server data as a parameter, including GUIDs and BLOBs.

In your Visual Studio 2005 project, add a simple xml configuration file. You'll describe where to find your database, and how the code will be generated. Don't worry, because there's an extensively self-documented example file to get you started.

Once you're satisfied with the configuration file, pull up the properties tab in Visual Studio and set the Custom Tool to NSprocs. There may be a slight pause while your code is generated.

You're done! Start coding using your new auto-generated class. You'll get code completion and IntelliSense parameters for all your stored procedures.