QueueHammer
QueueHammer

Reputation: 10824

Is there a way to bind a DataTable to an actual Table in a data base?

Is there any way to bind a DataTable object to an actual table in my database? Right now I perform a query and fill the DataTable with the result. It would be really cool if I could just DataTable.(Save/Update) with out having to write additional code!

Is such a thing or a similar solution possible?

Upvotes: 0

Views: 1534

Answers (3)

Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65371

Have a look at Entity Framework. With EF you make your changes and then call "savechanges", that will then persist any changes.

Upvotes: 0

Canavar
Canavar

Reputation: 48088

See DataAdapter.Update(). You should write some code..

Upvotes: 2

Rob Allen
Rob Allen

Reputation: 17709

Take a look at MyGeneration (template based code generator) and EasyObjects (ORM Mapping library) which, when combined, get you pretty close to this. MyGeneration will even write the CRUD stored procedures for you (but you need to apply them to the db).

Upvotes: 0

Related Questions