Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var someVariable = MainMethodToCall(rowId)
- public ICollection<RowObject> MainMethodToCall(int rowId)
- {
- ICollection<RowObject> rowsCollection = new Collection<RowObject>();
- rowsCollection = GetChildRows(rowId,rowsCollection);
- return rowsCollection;
- }
- public ICollection<RowObject> GetChildRows(int rowId, ICollection<RowObject> rowsCollection) {
- var rowObject= DatabaseCall.GetRowObject();
- rowsCollection.Add(position);
- if (DatabsaeCall().Where(x => x.ParentRowId == rowId).Any())
- {
- var childRows = DatabaseCall().Where(x => x.ParentRowId == rowId);
- foreach (var childRow in childRows )
- {
- GetChildRows(childRow.Id, rowsCollection);
- }
- }
- return rowsCollection;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement