示例#1
0
        public static internalDTO.ProductCompany MapFromBLL(externalDTO.ProductCompany productCompany)
        {
            var res = productCompany == null ? null : new internalDTO.ProductCompany
            {
                Id        = productCompany.Id,
                ProductId = productCompany.ProductId,
                Product   = ProductMapper.MapFromBLL(productCompany.Product),
                CompanyId = productCompany.CompanyId,
                Company   = CompanyMapper.MapFromBLL(productCompany.Company)
            };

            return(res);
        }
        public static internalDTO.CompanyRole MapFromBLL(externalDTO.CompanyRole companyRole)
        {
            var res = companyRole == null ? null : new internalDTO.CompanyRole
            {
                Id        = companyRole.Id,
                CompanyId = companyRole.CompanyId,
                Company   = CompanyMapper.MapFromBLL(companyRole.Company),
                CRoleId   = companyRole.CRoleId,
                CRole     = CRoleMapper.MapFromBLL(companyRole.CRole)
            };

            return(res);
        }