- Timestamp:
- 05/08/09 12:42:03 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataAccess.ADOHelper/3.2/ManyToManyRelationHelper.cs
r1729 r1758 10 10 { 11 11 ITableAdapterWrapper<AdapterT, ManyToManyRelation, RowT> tableAdapterWrapper; 12 12 13 private int childIndex; 14 13 15 public ManyToManyRelationHelper( 14 ITableAdapterWrapper<AdapterT, ManyToManyRelation, RowT> tableAdapterWrapper) { 16 ITableAdapterWrapper<AdapterT, ManyToManyRelation, RowT> tableAdapterWrapper, 17 int childIndex) { 15 18 this.tableAdapterWrapper = tableAdapterWrapper; 19 this.childIndex = childIndex; 16 20 } 17 21 … … 24 28 public void UpdateRelationships(Guid objectA, 25 29 IList<Guid> relationships, int childIndex) { 26 UpdateRelationships(objectA, relationships, null , childIndex);30 UpdateRelationships(objectA, relationships, null); 27 31 } 28 32 29 33 public void UpdateRelationships(Guid objectA, 30 34 IList<Guid> relationships, 31 IList<object> additionalAttributes , int childIndex) {35 IList<object> additionalAttributes) { 32 36 //firstly check for created references 33 37 IList<Guid> existing = 34 this.GetRelationships(objectA , childIndex);38 this.GetRelationships(objectA); 35 39 36 40 foreach (Guid relationship in relationships) { … … 63 67 foreach (Guid relationship in deleted) { 64 68 RowT toDelete = 65 FindRow(objectA, relationship , childIndex);69 FindRow(objectA, relationship); 66 70 if (toDelete != null) { 67 71 toDelete.Delete(); … … 71 75 } 72 76 73 public IList<Guid> GetRelationships(Guid objectA , int childIndex) {77 public IList<Guid> GetRelationships(Guid objectA) { 74 78 IList<Guid> result = 75 79 new List<Guid>(); … … 85 89 } 86 90 87 private RowT FindRow(Guid objectA, Guid objectB , int childIndex) {91 private RowT FindRow(Guid objectA, Guid objectB) { 88 92 IEnumerable<RowT> rows = 89 93 tableAdapterWrapper.FindById(objectA);
Note: See TracChangeset
for help on using the changeset viewer.