Page 1 of 1

DAL Generator Walk-through

Posted: Thu Apr 30, 2009 2:40 pm
by heinscott
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

Re: DAL Generator Walk-through

Posted: Fri May 01, 2009 3:46 am
by mazhar

Re: DAL Generator Walk-through

Posted: Fri May 01, 2009 8:44 am
by heinscott
...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

Re: DAL Generator Walk-through

Posted: Fri May 01, 2009 1:41 pm
by AbleMods
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.

Re: DAL Generator Walk-through

Posted: Mon Apr 26, 2010 3:34 pm
by AbleNovice
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

Re: DAL Generator Walk-through

Posted: Mon Apr 26, 2010 4:07 pm
by AbleMods
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.

Re: DAL Generator Walk-through

Posted: Thu Apr 29, 2010 11:15 am
by AbleNovice
Thanks, yes i have all the code.