private static IBusinessObjectCollection AddRelatedObjects <T>(TestBO testBO, string relationshipName, int numberOfBos, bool isNew) where T : TestBO, new() { IBusinessObjectCollection children = testBO.Relationships.GetRelatedCollection(relationshipName); for (int count = 1; count <= numberOfBos; count++) { T testBO2 = new T(); testBO2.SetStatus(BOStatus.Statuses.isNew, isNew); testBO2.MyBoID = "2." + TestUtil.GetRandomString(); testBO2.MyParentBoID = testBO.MyParentBoID; children.Add(testBO2); } return(children); }
private static IBusinessObjectCollection AddRelatedObjectsToPersisted <T>(TestBO testBO, string relationshipName, int numberOfBos) where T : TestBO, new() { return(AddRelatedObjectsToPersisted <T>(testBO, relationshipName, numberOfBos, false)); }