Reputation: 223
Sorry if my question is basic, when we use ADO.net to write own data access code, and we work with more than of one data table, data relation between data tables comes automatically from data base tables or we have to add data relation between data tables separately.
Upvotes: 0
Views: 243
Reputation: 6390
To understand Data Relation in Ado.Net you can read This.
when you work with more than of one data table then you can either write code yourself(using DataRelation),The DataSet contains DataTable objects and DataRelation objects. The DataRelation objects represent the relationship between two tables or you can use ERD(entity Relationship Diagram) to drag and show relationship among tables.
In my opinion database diagram is better as it reduces or exempt you do do extra code work, but manual code adds flexibility and customization.
Upvotes: 1