Ejemplo n.º 1
0
        public static Library.Item MapInventoryItem(Entities.InventoryItems dbmodel)
        {
            Library.Item result = new Library.Item
            {
                Product  = MapProduct(dbmodel.Product),
                Quantity = dbmodel.Quantity,
            };

            return(result);
        }
Ejemplo n.º 2
0
        /*------------------------------------------------------*/



        /* Item to InventoryItems Mapping */

        public static Entities.InventoryItems MapInventoryItem(Library.Location modelL, Library.Item modelP)
        {
            Entities.InventoryItems result = new Entities.InventoryItems
            {
                Product    = MapProduct(modelP.Product),
                ProductId  = modelP.Product.ID,
                Quantity   = modelP.Quantity,
                LocationId = modelL.Id,
                Location   = MapLocation(modelL)
            };

            return(result);
        }