Пример #1
0
        /* --------------------------------------------------------- */

        /* Item to OrderItems Mapping */
        public static Entities.OrderItems MapOrderItem(Library.Item modelI, Library.Order modelO)
        {
            Entities.OrderItems result = new Entities.OrderItems
            {
                OrderId   = modelO.OrderID,
                ProductId = modelI.Product.ID,
                Quantity  = modelI.Quantity,
            };

            return(result);
        }
Пример #2
0
        public static Library.Item MapOrderItem(Entities.OrderItems dbmodel)
        {
            Library.Item result = new Library.Item
            {
                // Should this be changed?
                //ItemID = dbmodel.OrderItem,
                Product  = MapProduct(dbmodel.Product),
                Quantity = dbmodel.Quantity
            };

            return(result);
        }