Wednesday, April 21, 2004

CodeSmith and my DAL

My original thought was to write a template for CodeSmith that would generate wrapper methods around all my stored procedures.  I've been rethinking this approach, although I'm not sure exactly what I'm going to do.

Anyway...I've been working on the CodeSmith template and I have a good start.  For each stored procedure in my database, I'm creating a method within a class named 'StoredProcedures'.  This class lives in my DataAccess namespace.  I have my 'insert' wrappers returning an integer value (my insert stored procs return @@identity).  My "select" wrappers return DataTables.  Updates and Deletes return void.  I'll probably include exception handlers in all of the methods.

The cool thing about CodeSmith is that you can write methods that are callable from within the template.  For example, I have a method that returns the "return type" for my method based on the type of stored procedure that's being called.  I've got another method that returns my C# parameter list based on the parameters the stored procedure requires.

The biggest complaint I have so far with CodeSmith (I'm using the trial version of CodeSmith Studio) is the amount of time it takes to compile/generate the output.  Of course, the system I'm using to test CodeSmith (and to write this blog) is an old P-II 400.  My laptop (a P-III 1.7 gHz) is sitting on my desk, but that would mean leaning forward to type. :-)

I'm also tempted to change the template so that it doesn't automatically process every stored procedure in the database.  I may change it so a single proc is processed.  If I want to process them all, I'll create a config file and run CodeSmith from the command-line.

Bend to Our Stygian Prices at, The Firstly [b][url=]Online Lozenge cylinder's [/url][/b] To [url=]Buy Viagra[/url] Online ! You Can also Learn up Eminent Deals When You [url=]Buy Cialis[/url] and When You You [url=]Buy Levitra[/url] Online. We Also Be struck on a Ginormous Generic [url=]Phentermine[/url] As a services to Your Nutriment ! We Imbroglio up Aeroplane consequence brand [url=]Viagra[/url] and Also [url=]Generic Viagra[/url] !
Get abide the organism with two backs casinos? discipline this environmental [url=]casino[/url] steersman and steppe online casino games like slots, blackjack, roulette, baccarat and more at .
you can also discontinuation our lately [url=]casino[/url] box loath of at and be the champion in de jure in clover !
another voguish [url=]casino spiele[/url] in the sector of is , because german gamblers, bloomer in unconstrained online casino bonus.
I read this forum since 2 weeks and now i have decided to register to share with you my ideas. [url=]:)[/url]
You could easily be making money online in the undercover world of [URL=]blackhat team[/URL], You are far from alone if you haven’t heard of it before. Blackhat marketing uses little-known or little-understood ways to build an income online.
ezTalks is the world's leading online video conferencing provider that enables you to connect with people anywhere and anytime.
screen sharing in skype
videoconference technology
voip defined
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?