public static ICollection <externalDTO.ProcurementObject> MapObjects(internalDTO.Procurement procurement) { ICollection <externalDTO.ProcurementObject> procurementObjects = new ICollection(); for (int i = 0; i < procurement.ProcurementObjects.Count; i++) { procurementObjects.Add(ProcurementObjectMapper.MapFromDAL(procurement.ProcurementObjects[i])); } }
public static externalDTO.Procurement MapFromInternal(internalDTO.Procurement procurement) { var res = procurement == null ? null : new externalDTO.Procurement { Id = procurement.Id, Name = procurement.Name, ProcurementObjects = { res.ProcurementObjects.Add(ob); }; }; for (int i = 0; i < procurement.ProcurementObjects.Count; i++) { res.ProcurementObjects.Add(ob); } return(res); }