Inheritance: AuditableEntity
		public static coreModel.ShipmentItem ToCoreModel(this webModel.ShipmentItem shipmentItem)
		{
			var retVal = new coreModel.ShipmentItem();
			retVal.InjectFrom(shipmentItem);

			if (shipmentItem.LineItem != null)
			{
				retVal.LineItem = shipmentItem.LineItem.ToCoreModel();
			}
			
			return retVal;
		}
Exemplo n.º 2
0
        protected virtual orderModel.ShipmentItem ToOrderModel(cartModel.ShipmentItem shipmentItem)
        {
            if (shipmentItem == null)
            {
                throw new ArgumentNullException(nameof(shipmentItem));
            }

            var retVal = AbstractTypeFactory <orderModel.ShipmentItem> .TryCreateInstance();

            retVal.BarCode  = shipmentItem.BarCode;
            retVal.Quantity = shipmentItem.Quantity;
            return(retVal);
        }
Exemplo n.º 3
0
        public static coreModel.ShipmentItem ToCoreModel(this webModel.ShipmentItem shipmentItem)
        {
            var retVal = new coreModel.ShipmentItem();

            retVal.InjectFrom(shipmentItem);

            if (shipmentItem.LineItem != null)
            {
                retVal.LineItem = shipmentItem.LineItem.ToCoreModel();
            }

            return(retVal);
        }
		public static ShipmentItem ToCoreModel(this ShipmentItemEntity entity)
		{
			if (entity == null)
				throw new ArgumentNullException("entity");

			var retVal = new ShipmentItem();
			retVal.InjectFrom(entity);

			if(entity.LineItem != null)
			{
				retVal.LineItem = entity.LineItem.ToCoreModel();
			}
			return retVal;
		}
Exemplo n.º 5
0
        public static ShipmentItem ToOrderCoreModel(this cartCoreModel.ShipmentItem shipmentItem)
        {
            if (shipmentItem == null)
            {
                throw new ArgumentNullException("shipmentItem");
            }

            var retVal = new ShipmentItem();

            retVal.InjectFrom(shipmentItem);

            retVal.LineItem = shipmentItem.LineItem.ToOrderCoreModel();
            return(retVal);
        }