PC Review


Reply
Thread Tools Rate Thread

can this coding be automated???

 
 
Jeff
Guest
Posts: n/a
 
      15th Nov 2007
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



 
Reply With Quote
 
 
 
 
cfps.Christian
Guest
Posts: n/a
 
      15th Nov 2007
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.
 
Reply With Quote
 
Colby Africa
Guest
Posts: n/a
 
      15th Nov 2007
Strongly typed datasets will give you a DAL pretty rapidly. Check out
this article:

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

Colby
 
Reply With Quote
 
Chris Mullins [MVP - C#]
Guest
Posts: n/a
 
      15th Nov 2007
CodeSmith is your friend. It'll do exactly what you described...

--
Chris Mullins

"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      15th Nov 2007
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
>
>
>
>

 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      15th Nov 2007
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]
- (E-Mail Removed)

"cfps.Christian" <(E-Mail Removed)> wrote in message
news:51edf9f6-ab09-49cf-b97f-(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Will Asrari
Guest
Posts: n/a
 
      15th Nov 2007
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" <(E-Mail Removed)> wrote
> can this be automated, so for example VS2005 generates the code
> automatically? any links about it?


 
Reply With Quote
 
Marc Gravell
Guest
Posts: n/a
 
      16th Nov 2007
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Automated tool to examine code against industry coding standards Luke Zhang [MSFT] Microsoft Dot NET 0 14th Dec 2006 02:33 AM
Automated signature updates w/o using Windows Automated Updates =?Utf-8?B?Q3VydEI=?= Security Signatures 3 15th May 2006 01:31 AM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan Microsoft Excel Programming 10 6th Oct 2005 01:18 PM
Automated filter? Automated replace? =?Utf-8?B?Y3Jja3JqY2s=?= Microsoft Excel Crashes 2 12th Jan 2005 11:09 PM
Problems with coding and coding question!! James Microsoft Access Form Coding 0 23rd Feb 2004 10:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:23 PM.