コード例 #1
0
                public TypedDataSetWithSelfReferencingTable()
                {
                    var table = new DataTableGeneratorFacet.TypedDataTable3();

                    Tables.Add(table);

                    Relations.Add(
                        new DataRelation(relationName: "Relation", parentColumn: table.Columns["RecordID"], childColumn: table.Columns["ParentIntColumn"], createConstraints: true));
                }
コード例 #2
0
                public TypedDataSetWithRelations()
                {
                    var table1 = new DataTableGeneratorFacet.TypedDataTable1();
                    var table2 = new DataTableGeneratorFacet.TypedDataTable2();
                    var table3 = new DataTableGeneratorFacet.TypedDataTable3();

                    Tables.Add(table3);
                    Tables.Add(table2);
                    Tables.Add(table1);

                    Relations.Add(
                        new DataRelation(relationName: "Relation1", parentColumn: table1.Columns["RecordID"], childColumn: table2.Columns["RecordID"], createConstraints: true));
                    Relations.Add(
                        new DataRelation(relationName: "Relation2", parentColumn: table2.Columns["IntColumn"], childColumn: table3.Columns["ParentIntColumn"], createConstraints: true));
                }