Ejemplo n.º 1
0
        public static Domain.Inventory MapFromDAL(DAL.App.DTO.DomainLikeDTO.Inventory inventoryWithProductCount)
        {
            var res = inventoryWithProductCount == null ? null : new Domain.Inventory
            {
                Id                    = inventoryWithProductCount.Id,
                Description           = new MultiLangString(inventoryWithProductCount.Description),
                InventoryCreationTime = inventoryWithProductCount.InventoryCreationTime,
                ShopId                = inventoryWithProductCount.ShopId,
                Shop                  = ShopMapper.MapFromDAL(inventoryWithProductCount.Shop)
            };

            return(res);
        }
Ejemplo n.º 2
0
        public static externalDTO.Inventory MapFromDAL(internalDTO.Inventory inventory)
        {
            var res = inventory == null ? null : new externalDTO.Inventory
            {
                Id                    = inventory.Id,
                Description           = inventory.Description,
                InventoryCreationTime = inventory.InventoryCreationTime,
                ShopId                = inventory.ShopId,
                Shop                  = ShopMapper.MapFromDAL(inventory.Shop)
            };

            return(res);
        }