Example #1
0
        public static internalDTO.ProductService MapFromDAL(externalDTO.ProductService productService)
        {
            var res = productService == null ? null : new internalDTO.ProductService()
            {
                Id                 = productService.Id,
                Description        = new internalDTO.MultiLangString(productService.Description),
                WorkObjectId       = productService.WorkObjectId,
                WorkObject         = WorkObjectMapper.MapFromDAL(productService.WorkObject),
                ProductForClientId = productService.ProductForClientId,
                ProductForClient   = ProductForClientMapper.MapFromDAL(productService.ProductForClient)
            };

            return(res);
        }
Example #2
0
        public static externalDTO.ProductService MapFromDomain(internalDTO.ProductService productService)
        {
            var res = productService == null ? null : new externalDTO.ProductService()
            {
                Id                 = productService.Id,
                Description        = productService.Description.Translate(),
                WorkObjectId       = productService.WorkObjectId,
                WorkObject         = WorkObjectMapper.MapFromDomain(productService.WorkObject),
                ProductForClientId = productService.ProductForClientId,
                ProductForClient   = ProductForClientMapper.MapFromDomain(productService.ProductForClient)
            };

            return(res);
        }