P
philc
I am looking at my project right now and I'm completely flabbergasted
at the number of stored procedures. Now I'm fine with some of the
more complex ones (with multiple joins and/or logic) but most of these
are simple CRUD (create, read, update, delete) from a single table
that should be generated automatically. I want to move away from
stored procedures for these cases because it's a maintanence
nightmare, has little if any performance gain, and is a waste of time.
There is a great discussion on this in this weblog entry:
http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx
For these, I already have a strongly typed dataset so this should be
really easy - I pass in my table to function foo and it should get
filled (or updated, inserted, deleted).
I could create a wrapper around the SqlCommandBuilder to generate the
select statement along with the other three. This is done here:
http://www.codeproject.com/cs/database/CustomCommandBuilder.asp
Or I could use the generated embedded sql by configuring DataAdapters
(by dragging in a table from server explorer) but this can get nasty
and it generates a lot of ugly (but hidden) code.
Now there are an abundance of existing solutions that will create the
entire data access layer code for you. This includes:
LLBLGen - http://www.llblgen.com/
Entity Broker - http://www.thona-consulting.com/content/products/entitybroker.aspx
Norpheme (open source) - http://www.norpheme.com/
Wilson ORMapper - http://www.ormapper.net/
CodeProject example -
http://www.codeproject.com/useritems/xmlsqlpp.asp#xx797672xx
Now these are all great but I believe they are overkill for me. I
don't want an entire data access layer generated for me - I just want
to take my strongly typed datasets (and my connection object) and use
a very thin on-the-fly solution to perform the crud actions on them.
CustomCommandBuilder seems pretty on target with what I want. Is
there a reason it received mixed reviews or why most solutions out
there generate a complete data access layer for you? I love my
strongly typed datasets and I like my code lean and complexity free.
at the number of stored procedures. Now I'm fine with some of the
more complex ones (with multiple joins and/or logic) but most of these
are simple CRUD (create, read, update, delete) from a single table
that should be generated automatically. I want to move away from
stored procedures for these cases because it's a maintanence
nightmare, has little if any performance gain, and is a waste of time.
There is a great discussion on this in this weblog entry:
http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx
For these, I already have a strongly typed dataset so this should be
really easy - I pass in my table to function foo and it should get
filled (or updated, inserted, deleted).
I could create a wrapper around the SqlCommandBuilder to generate the
select statement along with the other three. This is done here:
http://www.codeproject.com/cs/database/CustomCommandBuilder.asp
Or I could use the generated embedded sql by configuring DataAdapters
(by dragging in a table from server explorer) but this can get nasty
and it generates a lot of ugly (but hidden) code.
Now there are an abundance of existing solutions that will create the
entire data access layer code for you. This includes:
LLBLGen - http://www.llblgen.com/
Entity Broker - http://www.thona-consulting.com/content/products/entitybroker.aspx
Norpheme (open source) - http://www.norpheme.com/
Wilson ORMapper - http://www.ormapper.net/
CodeProject example -
http://www.codeproject.com/useritems/xmlsqlpp.asp#xx797672xx
Now these are all great but I believe they are overkill for me. I
don't want an entire data access layer generated for me - I just want
to take my strongly typed datasets (and my connection object) and use
a very thin on-the-fly solution to perform the crud actions on them.
CustomCommandBuilder seems pretty on target with what I want. Is
there a reason it received mixed reviews or why most solutions out
there generate a complete data access layer for you? I love my
strongly typed datasets and I like my code lean and complexity free.