can this coding be automated???

J

Jeff

Hey

..NET 2.0


I'm on a project where I'm now about to develop the Data Access Layer. The
database have 300 stored procedures. I'm about to go on a time consuming
process of writing the .NET code which calls all these stored procedures.
Each stored procedure should get it's own method in the Data Acess Layer..

can this be automated, so for example VS2005 generates the code
automatically? any links about it?

I hope this can be automated a bit, so it can save me time....

all suggestions are welcome :)

Jeff
 
C

cfps.Christian

Hey

.NET 2.0

I'm on a project where I'm now about to develop the Data Access Layer. The
database have 300 stored procedures. I'm about to go on a time consuming
process of writing the .NET code which calls all these stored procedures.
Each stored procedure should get it's own method in the Data Acess Layer..

can this be automated, so for example VS2005 generates the code
automatically? any links about it?

I hope this can be automated a bit, so it can save me time....

all suggestions are welcome :)

Jeff

If you're talking about automating the code writing you could always
cheat and code a loop through each of the stored procedures from one
of the system tables that will write the syntax of a function to a
textfile then copy the text into the editor.
 
N

Nicholas Paldino [.NET/C# MVP]

Or, even better, you could use the classes in the System.CodeDom
namespace to generate the code structure for you.

You can also create an instance of the MSDataSetGenerator class in the
assemblies in the VS.NET IDE directory. You can use those to generate the
code wrappers for the stored procedures yourself.
 
W

Will Asrari

Jeff

Subsonic is all the rage now. I believe that will help you out.

Personally I use the ADO.NET Code Generator by Robbe Morris (Google it).
It's on eggheadcafe and it works great. The source code is included. It
will generate base classes, interfaces, as well as stored procedures.

- Will
 
M

Marc Gravell

I know you said .NET 2.0, but just for reference; looking ahead a few
weeks, LINQ-to-SQL does exactly this (limited to SQL Server).
Advantages: app part of standard VS toolkit; get to play with LINQ;
Disadvantages: maybe not as feature rich as some others.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top