Beispiel #1
0
        public static PreOrderViewModel Convert(PreOrder preOrder)
        {
            PreOrderViewModel preOrderViewModel = new PreOrderViewModel();

            preOrderViewModel.Id         = preOrder.Id;
            preOrderViewModel.GearItemId = preOrder.GearItemId;
            preOrderViewModel.Quantity   = preOrder.Quantity;
            preOrderViewModel.Size       = preOrder.Size;
            preOrderViewModel.Contact    = PreOrderContactConverter.Convert(preOrder.Contact);

            return(preOrderViewModel);
        }
Beispiel #2
0
        public static List <PreOrderViewModel> ConvertList(IEnumerable <PreOrder> preOrders)
        {
            return(preOrders.Select(preOrder =>
            {
                PreOrderViewModel preOrderViewModel = new PreOrderViewModel();
                preOrderViewModel.Id = preOrder.Id;
                preOrderViewModel.GearItemId = preOrder.GearItemId;
                preOrderViewModel.Quantity = preOrder.Quantity;
                preOrderViewModel.Size = preOrder.Size;
                preOrderViewModel.Contact = PreOrderContactConverter.Convert(preOrder.Contact);

                return preOrderViewModel;
            }).ToList());
        }