예제 #1
0
        public static DAL.App.DTO.DomainLikeDTO.Category MapFromBLL(BLL.App.DTO.DomainLikeDTO.Category category)
        {
            var res = category == null ? null : new DAL.App.DTO.DomainLikeDTO.Category
            {
                Id           = category.Id,
                CategoryName = category.CategoryName,
                ShopId       = category.ShopId,
                Shop         = ShopMapper.MapFromBLL(category.Shop)
            };

            return(res);
        }
예제 #2
0
        public static internalDTO.Defect MapFromBLL(externalDTO.Defect defectWithProductCount)
        {
            var res = defectWithProductCount == null ? null : new internalDTO.Defect
            {
                Id          = defectWithProductCount.Id,
                Description = defectWithProductCount.Description,
                ShopId      = defectWithProductCount.ShopId,
                Shop        = ShopMapper.MapFromBLL(defectWithProductCount.Shop)
            };

            return(res);
        }
예제 #3
0
        public static internalDTO.Return MapFromBLL(externalDTO.Return returnWithProductCount)
        {
            var res = returnWithProductCount == null ? null : new internalDTO.Return
            {
                Id          = returnWithProductCount.Id,
                Description = returnWithProductCount.Description,
                ShopId      = returnWithProductCount.ShopId,
                Shop        = ShopMapper.MapFromBLL(returnWithProductCount.Shop)
            };

            return(res);
        }
예제 #4
0
        public static internalDTO.Inventory MapFromBLL(externalDTO.Inventory inventoryWithProductCount)
        {
            var res = inventoryWithProductCount == null ? null : new internalDTO.Inventory
            {
                Id                    = inventoryWithProductCount.Id,
                Description           = inventoryWithProductCount.Description,
                InventoryCreationTime = inventoryWithProductCount.InventoryCreationTime,
                ShopId                = inventoryWithProductCount.ShopId,
                Shop                  = ShopMapper.MapFromBLL(inventoryWithProductCount.Shop)
            };

            return(res);
        }
예제 #5
0
        public static internalDTO.Order MapFromBLL(externalDTO.Order order)
        {
            var res = order == null ? null : new internalDTO.Order
            {
                Id                = order.Id,
                Description       = order.Description,
                OrderCreationTime = order.OrderCreationTime,
                ShipperId         = order.ShipperId,
                Shipper           = ShipperMapper.MapFromBLL(order.Shipper),
                ShopId            = order.ShopId,
                Shop              = ShopMapper.MapFromBLL(order.Shop),
            };

            return(res);
        }
예제 #6
0
        public static DAL.App.DTO.DomainLikeDTO.Identity.AppUser MapFromBLL(BLL.App.DTO.DomainLikeDTO.Identity.AppUser appUser)
        {
            var res = appUser == null ? null : new DAL.App.DTO.DomainLikeDTO.Identity.AppUser
            {
                Id        = appUser.Id,
                FirstName = appUser.FirstName,
                LastName  = appUser.LastName,
                Aadress   = appUser.Aadress,
                Email     = appUser.Email,
                ShopId    = appUser.ShopId,
                Shop      = ShopMapper.MapFromBLL(appUser.Shop)
            };

            return(res);
        }
예제 #7
0
        public static internalDTO.DomainLikeDTO.Comment MapFromBLL(externalDTO.DomainLikeDTO.Comment comment)
        {
            var res = comment == null ? null : new internalDTO.DomainLikeDTO.Comment
            {
                Id           = comment.Id,
                CommentTitle = comment.CommentTitle,
                CommentBody  = comment.CommentBody,
                ProductId    = comment.ProductId,
                Product      = ProductMapper.MapFromBLL(comment.Product),
                ShopId       = comment.ShopId,
                Shop         = ShopMapper.MapFromBLL(comment.Shop)
            };

            return(res);
        }
예제 #8
0
        public static internalDTO.Product MapFromBLL(externalDTO.Product product)
        {
            var res = product == null ? null : new internalDTO.Product
            {
                Id = product.Id,
                ManuFacturerItemCode      = product.ManuFacturerItemCode,
                ShopCode                  = product.ShopCode,
                ProductName               = product.ProductName,
                BuyPrice                  = product.BuyPrice,
                PercentageAddedToBuyPrice = product.PercentageAddedToBuyPrice,
                SellPrice                 = product.SellPrice,
                Quantity                  = product.Quantity,
                Weight         = product.Weight,
                Length         = product.Length,
                ManuFacturerId = product.ManuFacturerId,
                Manufacturer   = ManuFacturerMapper.MapFromBLL(product.Manufacturer),
                InventoryId    = product.InventoryId,
                Inventory      = InventoryMapper.MapFromBLL(product.Inventory),
                ShopId         = product.ShopId,
                Shop           = ShopMapper.MapFromBLL(product.Shop)
            };

            return(res);
        }