Exemplo n.º 1
0
 // copy all rows from a List of SOAP Contracts to a List of serialized data objects
 // links:
 //  docLink: http://sql2x.org/documentationLink/1c6c6b9c-e201-4590-8c69-d38a0ad2a9f7
 public static void ContractListToDataList(List <CrudeProductCategoryImageContract> contractList, List <CrudeProductCategoryImageData> dataList)
 {
     foreach (CrudeProductCategoryImageContract contract in contractList)
     {
         var data = new CrudeProductCategoryImageData();
         CrudeProductCategoryImageService.ContractToData(contract, data);
         dataList.Add(data);
     }
 }
Exemplo n.º 2
0
        public ProductCategoryContract ProductCategoryGetCompleteById(Guid productCategoryId)
        {
            var contract = new ProductCategoryContract();
            var data     = new Category(productCategoryId);

            // move data from data access layer to business logic layer
            contract.ProductCategory = new CrudeProductCategoryContract();
            CrudeProductCategoryService.DataToContract(data.ProductCategory, contract.ProductCategory);

            contract.ProductCategoryImage         = CrudeProductCategoryImageService.DataListToContractList(data.ProductCategoryImage);
            contract.ProductCategoryDocumentation = CrudeProductCategoryDocumentationService.DataListToContractList(data.ProductCategoryDocumentation);

            return(contract);
        }