473,387 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

can this coding be automated???

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

Nov 15 '07 #1
7 1517
On Nov 15, 11:25 am, "Jeff" wrote:
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.
Nov 15 '07 #2
Strongly typed datasets will give you a DAL pretty rapidly. Check out
this article:

http://aspnet.4guysfromrolla.com/articles/020806-1.aspx

Colby
Nov 15 '07 #3
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"cfps.Christian" <ge*******@otc.eduwrote in message
news:51**********************************@f13g2000 hsa.googlegroups.com...
On Nov 15, 11:25 am, "Jeff" wrote:
>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.

Nov 15 '07 #4
CodeSmith is your friend. It'll do exactly what you described...

--
Chris Mullins

"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
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

Nov 15 '07 #5
Take a look at the Repository Factory. You can find it on Codeplex.com here:

http://www.codeplex.com/RepositoryFactory
--Peter
http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Jeff" wrote:
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

Nov 15 '07 #6
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
>"Jeff" <it************@hotmail.com.NOSPAMwrote
can this be automated, so for example VS2005 generates the code
automatically? any links about it?
Nov 15 '07 #7
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
Nov 16 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ct-86 | last post by:
http://www.cdbook.cn/book.asp?id=2393 Organizational and Policy Issues 1 0. Don't sweat the small stuff. (Or: Know what not to standardize.) 2 1. Compile cleanly at high warning levels. 4 2....
50
by: Konrad Palczynski | last post by:
I am looking for tool to validate conformity to defined coding standard. I have already found Parasoft's C++ Test, but it is quite expensive. Is there any Open Source alternative? I do not need...
17
by: M.Siler | last post by:
I'm trying to get my head around a conversation I had with a developer the other day. We were talking about Codesmith vs. Hand coding. He's position is Codesmith is for junior to mid level...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.