DAL Generator Walk-through

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

DAL Generator Walk-through

Post by heinscott » Thu Apr 30, 2009 2:40 pm

I was wondering if anyone would be able to provide a step-by-step walkthrough for how to add a new DAL to an AbleCommerce store using the generator. So far, I've been doing it all the long-way, and it sure would be nice to automate some of the process.
Thanks for the help.

Scott

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: DAL Generator Walk-through

Post by mazhar » Fri May 01, 2009 3:46 am


User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: DAL Generator Walk-through

Post by heinscott » Fri May 01, 2009 8:44 am

...of all the things I've seen in my life...

THAT WAS AWESOME!!!!!!!!!!

Wow! Thanks so much Mazhar. This little program saved me so much work I can't even describe it!!!
I just followed your instructions, and after getting all the setup taken care of, I was able to

1) Create a new table with 13 fields.
2) Generate code for the item, datasource, and collection classes.
3) Incorporate the code into my project.

...in about 10 minutes time.

Thanks SO much for taking the time to help with this. I really appreciate all you do for this community.

Scott

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: DAL Generator Walk-through

Post by AbleMods » Fri May 01, 2009 1:41 pm

Yeah it's pretty slick. Mazhar gets a 12-pack of Pepsi for that one.

I ported it into VB plus added some support for StoreId.

I must have spent 8 hours putting together a complete set of datasource classes - now takes like *whammo* 5-10 minutes and I'm using my data strongly-typed and consistent with Able code.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

AbleNovice
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Tue Mar 09, 2010 11:53 am

Re: DAL Generator Walk-through

Post by AbleNovice » Mon Apr 26, 2010 3:34 pm

Is this still how it should be done?
If I add a column to an existing table I want to regenrate the code for the table modified.?.?

Also when i generate the code i see it in the output tab but nothing gets saed to the generatedcode folder.
Also will it generate a file per table/object?

Thanks

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: DAL Generator Walk-through

Post by AbleMods » Mon Apr 26, 2010 4:07 pm

Yes it's still how I do it. Saves me a billion hours of hand-coding to get fully functional data classes.

However you must have full source code to AC7 and Visual Studio to recompile the modified data classes into DLL's.

When I use the code generator, I just copy/paste the specific class code I want from the generated code and paste it into an empty class file. When modifying existing AC7 data class code, you'll need to be sure to replace that generated code with your own generated code. This includes the object class, collection class and the datasource class.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

AbleNovice
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Tue Mar 09, 2010 11:53 am

Re: DAL Generator Walk-through

Post by AbleNovice » Thu Apr 29, 2010 11:15 am

Thanks, yes i have all the code.

Post Reply