示例#1
0
        public static Domain.Category MapFromDAL(DAL.App.DTO.DomainLikeDTO.Category category)
        {
            var res = category == null ? null : new Domain.Category
            {
                Id           = category.Id,
                CategoryName = new MultiLangString(category.CategoryName),
                ShopId       = category.ShopId,
                Shop         = ShopMapper.MapFromDAL(category.Shop)
            };

            return(res);
        }
示例#2
0
        public static Domain.Return MapFromDAL(DAL.App.DTO.DomainLikeDTO.Return returnWithProductCount)
        {
            var res = returnWithProductCount == null ? null : new Domain.Return
            {
                Id          = returnWithProductCount.Id,
                Description = new MultiLangString(returnWithProductCount.Description),
                ShopId      = returnWithProductCount.ShopId,
                Shop        = ShopMapper.MapFromDAL(returnWithProductCount.Shop)
            };

            return(res);
        }
示例#3
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);
        }
示例#4
0
        public static Domain.Order MapFromDAL(DAL.App.DTO.DomainLikeDTO.Order order)
        {
            var res = order == null ? null : new Domain.Order
            {
                Id                = order.Id,
                Description       = new MultiLangString(order.Description),
                OrderCreationTime = order.OrderCreationTime,
                ShipperId         = order.ShipperId,
                Shipper           = ShipperMapper.MapFromDAL(order.Shipper),
                ShopId            = order.ShopId,
                Shop              = ShopMapper.MapFromDAL(order.Shop)
            };

            return(res);
        }
示例#5
0
        public static Domain.Identity.AppUser MapFromDAL(DAL.App.DTO.DomainLikeDTO.Identity.AppUser appUser)
        {
            var res = appUser == null ? null : new Domain.Identity.AppUser
            {
                Id        = appUser.Id,
                FirstName = appUser.FirstName,
                LastName  = appUser.LastName,
                Aadress   = appUser.Aadress,
                Email     = appUser.Email,
                ShopId    = appUser.ShopId,
                Shop      = ShopMapper.MapFromDAL(appUser.Shop)
            };

            return(res);
        }
示例#6
0
        public static Domain.Comment MapFromDAL(DAL.App.DTO.DomainLikeDTO.Comment comment)
        {
            var res = comment == null ? null : new Domain.Comment
            {
                Id           = comment.Id,
                CommentTitle = new MultiLangString(comment.CommentTitle),
                CommentBody  = new MultiLangString(comment.CommentBody),
                ProductId    = comment.ProductId,
                Product      = ProductMapper.MapFromDAL(comment.Product),
                ShopId       = comment.ShopId,
                Shop         = ShopMapper.MapFromDAL(comment.Shop)
            };

            return(res);
        }
示例#7
0
        public static Domain.Product MapFromDAL(DAL.App.DTO.DomainLikeDTO.Product product)
        {
            var res = product == null ? null : new Domain.Product
            {
                Id = product.Id,
                ManuFacturerItemCode      = new MultiLangString(product.ManuFacturerItemCode),
                ShopCode                  = new MultiLangString(product.ShopCode),
                ProductName               = new MultiLangString(product.ProductName),
                BuyPrice                  = product.BuyPrice,
                PercentageAddedToBuyPrice = product.PercentageAddedToBuyPrice,
                SellPrice                 = product.SellPrice,
                Quantity                  = product.Quantity,
                Weight         = new MultiLangString(product.Weight),
                Length         = new MultiLangString(product.Length),
                ManuFacturerId = product.ManuFacturerId,
                Manufacturer   = ManuFacturerMapper.MapFromDAL(product.Manufacturer),
                InventoryId    = product.InventoryId,
                Inventory      = InventoryMapper.MapFromDAL(product.Inventory),
                ShopId         = product.ShopId,
                Shop           = ShopMapper.MapFromDAL(product.Shop)
            };

            return(res);
        }