Reputation: 2552
iv been following tuts on learnvisualstudio.net and im confused as to how you get a dataset from a database. is there someway to "convert" a database into a dataset making it easier to access? (rather than using ADO.NET 2.0)
Thanks in advance.
EDIT:
never mind its all good now :D
Upvotes: 1
Views: 886
Reputation: 1486
Yes there is a way to "import" your database schema to your application.
It's called strong typed Dataset, which will contain datatables with the same datatypes as your database. (for example: dtCustomerRow).
After importing your Database Schema to a typed Dataset you will have to use so called "TableAdapters" to load the Data.
Warning: This technique is handy, but also bad on performance.
Tutorial (is for asp.net, but also works for win forms):
Upvotes: 2
Reputation: 4687
You might be referring to ORM's. They can derive domain entity models from your database, and with thanks to Linq (amongst other things) you can then get much simpler access to your datasource, beit a database, RSS feed, XML document, etc.
I'd recommend taking a look at one of the following (both Microsoft tecnologies, but be aware there are many excellent - and free - alternatives available):
Linq To Sql:
Entity Framework 4:
If you are not interesting in leaning ORM's yet, then perhaps you are referring to Typed Datasets? - As suggested by @Henk Holterman
Upvotes: 2