Пример #1
0
        public static externalDTO.Product MapFromBLL(internalDTO.Product product)
        {
            var res = product == null ? null : new externalDTO.Product()
            {
                Id = product.Id,
                RouteOfAdministrationId = product.RouteOfAdministrationId,
                RouteOfAdministration   = RouteOfAdministrationMapper.MapFromBLL(product.RouteOfAdministration),
                ProductClassificationId = product.ProductClassificationId,
                ProductClassification   = ProductClassificationMapper.MapFromBLL(product.ProductClassification),
                ProductNameId           = product.ProductNameId,
                ProductName             = ProductNameMapper.MapFromBLL(product.ProductName)
            };

            return(res);
        }
        public static externalDTO.Customs.ProductOverview MapFromBLL(internalDTO.Customs.ProductOverview product)
        {
            var res = product == null ? null : new externalDTO.Customs.ProductOverview()
            {
                Id = product.Id,
                RouteOfAdministrationId = product.RouteOfAdministrationId,
                RouteOfAdministration   = RouteOfAdministrationMapper.MapFromBLL(product.RouteOfAdministration),
                ProductClassificationId = product.ProductClassificationId,
                ProductClassification   = ProductClassificationMapper.MapFromBLL(product.ProductClassification),
                ProductNameId           = product.ProductNameId,
                ProductName             = ProductNameMapper.MapFromBLL(product.ProductName),
                ProductCompanyId        = product.ProductCompanyId,
                ProductCompany          = ProductCompanyMapper.MapFromBLL(product.ProductCompany)
            };

            return(res);
        }
        public static externalDTO.Customs.ProductDetails MapFromBLL(internalDTO.Customs.ProductDetails product)
        {
            var res = product == null ? null : new externalDTO.Customs.ProductDetails()
            {
                Id = product.Id,
                RouteOfAdministrationId = product.RouteOfAdministrationId,
                RouteOfAdministration   = RouteOfAdministrationMapper.MapFromBLL(product.RouteOfAdministration),
                ProductClassificationId = product.ProductClassificationId,
                ProductClassification   = ProductClassificationMapper.MapFromBLL(product.ProductClassification),
                ProductNameId           = product.ProductNameId,
                ProductName             = ProductNameMapper.MapFromBLL(product.ProductName),
                ProductCompanyId        = product.ProductCompanyId,
                ProductCompany          = ProductCompanyMapper.MapFromBLL(product.ProductCompany),
                ProductDescriptionId    = product.ProductDescriptionId,
                ProductDescription      = ProductDescriptionMapper.MapFromBLL(product.ProductDescription),
                ProductDosageId         = product.ProductDosageId,
                ProductDosage           = ProductDosageMapper.MapFromBLL(product.ProductDosage)
            };

            return(res);
        }