예제 #1
0
        public static externalDTO.Product MapFromDAL(internalDTO.Product product)
        {
            var res = product == null ? null : new externalDTO.Product()
            {
                Id = product.Id,
                RouteOfAdministrationId = product.RouteOfAdministrationId,
                RouteOfAdministration   = RouteOfAdministrationMapper.MapFromDAL(product.RouteOfAdministration),
                ProductClassificationId = product.ProductClassificationId,
                ProductClassification   = ProductClassificationMapper.MapFromDAL(product.ProductClassification),
                ProductNameId           = product.ProductNameId,
                ProductName             = ProductNameMapper.MapFromDAL(product.ProductName)
            };

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

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

            return(res);
        }