using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; public static class ProcessParametersTablesGroupExtensions { public static ProcessParametersTablesGroup CloneGroup(this ProcessParametersTablesGroup group) { ProcessParametersTablesGroup cloned = group.CloneEntity(); List tables = new List(); foreach (var table in group.ProcessParametersTables) { var newTable = table.CloneEntity(); newTable.ProcessParametersTablesGroup = cloned; tables.Add(newTable); } cloned.ProcessParametersTables = tables.ToObservableCollection(); return cloned; } }