Populate a class automatically?

  • Thread starter Thread starter Steven Blair
  • Start date Start date
S

Steven Blair

I am using an objectdatasource and binding to an aggregate data type.

My aggregate data type is ebing populated like:

http://www.rafb.net/paste/results/6WeLS821.html

Is there some way of automatically doing this?
Something like:

MyClass = myDataSet; //yes I want to be lazy :P

The approach on the code uses only a couple of parameters which is fine,
but my app will have excess of 20 parameters.

Thanks in advance

Steven
 
Check out DevForce from IdeaBlade (www.ideablade.com). There is a free
Express version for client-server, SQL Server applications. Anyway, it
generates your business objects from your database schema (with your
tweaks). It also handles the bi-directional data binding and other
complexities of building regular database business applications. I'm a
satisfied client.
 
I built a code generator to do all this crap for me.

Me too. Basically, it is a simple WinForms app which works thus:

1) The user types in the SQL Connection string and hits the "Connect"
button.

2) Assuming the connection is successful, a ComboBox is populated with all
the user tables in the database specified in the SQL connection string

3) When the user selects one of the tables listed in the ComboBox, the
following code is generated:

a) INSERT stored procedure
b) UPDATE stored procedure
c) DELETE stored procedure
d) EXISTS stored procedure
e) SELECT stored procedure
f) C# class with all of the fields from the tables as properties, an
Insert() method, an Update() method, a Delete() method, an Exists() method
and a Select() method

This does about 95% of everything I need.
 
Back
Top