public static ClientShipment Cast(ShipmentDB order) { var newObject = new ClientShipment() { IdShipment = order.IdShipment, Orders = Cast(order.Orders), QuantityOrders = order.Quantity, TotalWeigthOrders = order.TotalWeigthOrders, IdLoad = order.IdLoad }; return(newObject); }
public static IList <ClientShipment> Cast(IList <ShipmentDB> order) { var list = new List <ClientShipment>(); foreach (var item in order) { var newObject = new ClientShipment() { IdShipment = item.IdShipment, Orders = Cast(item.Orders), QuantityOrders = item.Quantity, TotalWeigthOrders = item.TotalWeigthOrders, IdLoad = item.IdLoad }; list.Add(newObject); } return(list); }