Hello everyone,

Anyone out there have a DAL Generator Utility for sale for free that mimics
what happens in the IDE designer when you drag a dataadapter onto a
component?

I like what MS did here, I just don't like the instantiation of all the
objects on New().

They Do:

Sub Initialize()
da1 = new dataadapter
da2 = new dataadapter
sqlconn = new connection(someconnectionstring)
selectcommand1 = new command

....

I want to do

readonly property da1 as dataadapter
get
if m_da1 is nothing then
m_da1 = new dataadapter
m_da1.connection = GetConnection

'Add transaction support
if m_intransaction then
dim cb as commandbuilder
....

'Add event handlers
addhandler m_da1.....


I have 40 tables, that is a lot of copy and paste, and too many chances to
get it wrong and wind up chasing redherrings. Plus if I make and schema
changes, I would have to manually correct the changes in my DAL.

I have been playing with creating my own generator, and realized that they
is way too much I don't know and understand about what goes on to make a
generic tool nor do I have the time to get the tool to a point where I can
use it for my application. I spent 4 days manually setting up my DAL more
consistent with a format that I wanted. Now the business has come back with
some additional changes and I must begin this arduous process again.


Thanks in advance

Re: Anyone have a DAL Generator? by Miha

Miha
Tue Aug 30 11:10:25 CDT 2005

Take a look at http://www.codesmithtools.com/

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

"AMDRIT" <amdrit@hotmail.com> wrote in message
news:euiYfsXrFHA.2064@TK2MSFTNGP09.phx.gbl...
> Hello everyone,
>
> Anyone out there have a DAL Generator Utility for sale for free that
> mimics what happens in the IDE designer when you drag a dataadapter onto a
> component?
>
> I like what MS did here, I just don't like the instantiation of all the
> objects on New().
>
> They Do:
>
> Sub Initialize()
> da1 = new dataadapter
> da2 = new dataadapter
> sqlconn = new connection(someconnectionstring)
> selectcommand1 = new command
>
> ....
>
> I want to do
>
> readonly property da1 as dataadapter
> get
> if m_da1 is nothing then
> m_da1 = new dataadapter
> m_da1.connection = GetConnection
>
> 'Add transaction support
> if m_intransaction then
> dim cb as commandbuilder
> ....
>
> 'Add event handlers
> addhandler m_da1.....
>
>
> I have 40 tables, that is a lot of copy and paste, and too many chances to
> get it wrong and wind up chasing redherrings. Plus if I make and schema
> changes, I would have to manually correct the changes in my DAL.
>
> I have been playing with creating my own generator, and realized that they
> is way too much I don't know and understand about what goes on to make a
> generic tool nor do I have the time to get the tool to a point where I can
> use it for my application. I spent 4 days manually setting up my DAL more
> consistent with a format that I wanted. Now the business has come back
> with some additional changes and I must begin this arduous process again.
>
>
> Thanks in advance
>
>
>
>



Re: Anyone have a DAL Generator? by Jim

Jim
Tue Aug 30 11:14:00 CDT 2005

CodeSmith from www.codesmithtools.com allows you to create and reuse
templates.

It has the ability to connect to databases and create code with database
driven design.

You may also want to look at the OR Mapper http://www.wilsondotnet.com with
the included CodeSmith templates as a DAL implementation.

The 4 days you spent could be reduced to less than 4 seconds! You can repeat
the generation as often as necssary as the schema changes.

Kathleen Dollard has a book called Code Generation that you may want to look
into.

"AMDRIT" <amdrit@hotmail.com> wrote in message
news:euiYfsXrFHA.2064@TK2MSFTNGP09.phx.gbl...
> Hello everyone,
>
> Anyone out there have a DAL Generator Utility for sale for free that
> mimics what happens in the IDE designer when you drag a dataadapter onto a
> component?
>
> I like what MS did here, I just don't like the instantiation of all the
> objects on New().
>
> They Do:
>
> Sub Initialize()
> da1 = new dataadapter
> da2 = new dataadapter
> sqlconn = new connection(someconnectionstring)
> selectcommand1 = new command
>
> ....
>
> I want to do
>
> readonly property da1 as dataadapter
> get
> if m_da1 is nothing then
> m_da1 = new dataadapter
> m_da1.connection = GetConnection
>
> 'Add transaction support
> if m_intransaction then
> dim cb as commandbuilder
> ....
>
> 'Add event handlers
> addhandler m_da1.....
>
>
> I have 40 tables, that is a lot of copy and paste, and too many chances to
> get it wrong and wind up chasing redherrings. Plus if I make and schema
> changes, I would have to manually correct the changes in my DAL.
>
> I have been playing with creating my own generator, and realized that they
> is way too much I don't know and understand about what goes on to make a
> generic tool nor do I have the time to get the tool to a point where I can
> use it for my application. I spent 4 days manually setting up my DAL more
> consistent with a format that I wanted. Now the business has come back
> with some additional changes and I must begin this arduous process again.
>
>
> Thanks in advance
>
>
>
>



Re: Anyone have a DAL Generator? by AMDRIT

AMDRIT
Tue Aug 30 11:25:56 CDT 2005

Thanks for the reply, I will evaluate this product this weekend. I have
enough other work to keep me busy until then. By Monday, who knows, maybe
it becomes a one day task.

Have you used this product? For the most part it appears to be template
driven. But is it database smart? I mean can I say (Hey I want to create a
dataadpater here), specify that I want it to look like a readonly property
and use transaction support) and it will say (Ok tough guy i'll do that, but
you have to provide me a point reference point of all the columns you want
to use from the (view/table) and I will create sqlstored procs for you too)


Thanks again

"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:OXTwW1XrFHA.2876@TK2MSFTNGP12.phx.gbl...
> Take a look at http://www.codesmithtools.com/
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
> SLODUG - Slovene Developer Users Group www.codezone-si.info
>
> "AMDRIT" <amdrit@hotmail.com> wrote in message
> news:euiYfsXrFHA.2064@TK2MSFTNGP09.phx.gbl...
>> Hello everyone,
>>
>> Anyone out there have a DAL Generator Utility for sale for free that
>> mimics what happens in the IDE designer when you drag a dataadapter onto
>> a component?
>>
>> I like what MS did here, I just don't like the instantiation of all the
>> objects on New().
>>
>> They Do:
>>
>> Sub Initialize()
>> da1 = new dataadapter
>> da2 = new dataadapter
>> sqlconn = new connection(someconnectionstring)
>> selectcommand1 = new command
>>
>> ....
>>
>> I want to do
>>
>> readonly property da1 as dataadapter
>> get
>> if m_da1 is nothing then
>> m_da1 = new dataadapter
>> m_da1.connection = GetConnection
>>
>> 'Add transaction support
>> if m_intransaction then
>> dim cb as commandbuilder
>> ....
>>
>> 'Add event handlers
>> addhandler m_da1.....
>>
>>
>> I have 40 tables, that is a lot of copy and paste, and too many chances
>> to get it wrong and wind up chasing redherrings. Plus if I make and
>> schema changes, I would have to manually correct the changes in my DAL.
>>
>> I have been playing with creating my own generator, and realized that
>> they is way too much I don't know and understand about what goes on to
>> make a generic tool nor do I have the time to get the tool to a point
>> where I can use it for my application. I spent 4 days manually setting
>> up my DAL more consistent with a format that I wanted. Now the business
>> has come back with some additional changes and I must begin this arduous
>> process again.
>>
>>
>> Thanks in advance
>>
>>
>>
>>
>
>



Re: Anyone have a DAL Generator? by Frans

Frans
Tue Aug 30 13:39:02 CDT 2005

AMDRIT wrote:

> Hello everyone,
>
> Anyone out there have a DAL Generator Utility for sale for free that
> mimics what happens in the IDE designer when you drag a dataadapter
> onto a component?
>
> I like what MS did here, I just don't like the instantiation of all
> the objects on New().
>
> They Do:
>
> Sub Initialize()
> da1 = new dataadapter
> da2 = new dataadapter
> sqlconn = new connection(someconnectionstring)
> selectcommand1 = new command
>
> ....
>
> I want to do
>
> readonly property da1 as dataadapter
> get
> if m_da1 is nothing then
> m_da1 = new dataadapter
> m_da1.connection = GetConnection
>
> 'Add transaction support
> if m_intransaction then
> dim cb as commandbuilder
> ....
>
> 'Add event handlers
> addhandler m_da1.....
>
>
> I have 40 tables, that is a lot of copy and paste, and too many
> chances to get it wrong and wind up chasing redherrings. Plus if I
> make and schema changes, I would have to manually correct the changes
> in my DAL.
>
> I have been playing with creating my own generator, and realized that
> they is way too much I don't know and understand about what goes on
> to make a generic tool nor do I have the time to get the tool to a
> point where I can use it for my application. I spent 4 days manually
> setting up my DAL more consistent with a format that I wanted. Now
> the business has come back with some additional changes and I must
> begin this arduous process again.

see: http://www.llblgen.com

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Re: Anyone have a DAL Generator? by Robbe

Robbe
Tue Aug 30 19:50:36 CDT 2005

http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp

--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp



"AMDRIT" <amdrit@hotmail.com> wrote in message
news:euiYfsXrFHA.2064@TK2MSFTNGP09.phx.gbl...
> Hello everyone,
>
> Anyone out there have a DAL Generator Utility for sale for free that
> mimics what happens in the IDE designer when you drag a dataadapter onto a
> component?
>
> I like what MS did here, I just don't like the instantiation of all the
> objects on New().
>
> They Do:
>
> Sub Initialize()
> da1 = new dataadapter
> da2 = new dataadapter
> sqlconn = new connection(someconnectionstring)
> selectcommand1 = new command
>
> ....
>
> I want to do
>
> readonly property da1 as dataadapter
> get
> if m_da1 is nothing then
> m_da1 = new dataadapter
> m_da1.connection = GetConnection
>
> 'Add transaction support
> if m_intransaction then
> dim cb as commandbuilder
> ....
>
> 'Add event handlers
> addhandler m_da1.....
>
>
> I have 40 tables, that is a lot of copy and paste, and too many chances to
> get it wrong and wind up chasing redherrings. Plus if I make and schema
> changes, I would have to manually correct the changes in my DAL.
>
> I have been playing with creating my own generator, and realized that they
> is way too much I don't know and understand about what goes on to make a
> generic tool nor do I have the time to get the tool to a point where I can
> use it for my application. I spent 4 days manually setting up my DAL more
> consistent with a format that I wanted. Now the business has come back
> with some additional changes and I must begin this arduous process again.
>
>
> Thanks in advance
>
>
>
>