473,698 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1531
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 MSDataSetGenera tor 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.co m

"cfps.Christian " <ge*******@otc. eduwrote in message
news:51******** *************** ***********@f13 g2000hsa.google groups.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
automaticall y? 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.NO SPAMwrote in message
news:eT******** ******@TK2MSFTN GP03.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.NO SPAMwrote
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
3344
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. Use an automated build system. 7 3. Use a version control system.
50
4718
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 GUI, fancy reports nor predefined sets of rules.
17
1662
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 developer who perfer "wizards" to write code for them. That these types of code generators produce substandard developers who don't have real skills. I don't have a position one way or the other until I have a bit more information, but if I was to take...
0
8683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.