I was really drawn in and fascinated by the DataRelation object for use in an ADO.NET DataSet to cache data from my database in an ASP.NET web application. Unfortunately, I realized quite late, that I really have three DataTables.
- Users with a PK of UserID
- Groups with a PK of GroupID
- UsersInGroups a linking table with UserID and GroupID columns
Is it possible to load these three tables into a DataSet, add DataRelations, and then retrieve:
- All Groups
- All Users
- All Groups that contain a certain user (by UserID)
- All Users in a specific group (by GroupID)