using System; using System.Collections.Generic; using EnterpriseSample.Core.Domain; using ProjectBase.Utils; namespace EnterpriseSample.Core.Dto { [Serializable] public class CustomerDto { private CustomerDto() {} public CustomerDto(Customer customer) { Check.Require(customer != null, "customer may not be null"); id = customer.ID; companyName = customer.CompanyName; foreach (Order order in customer.Orders) { orderDtos.Add(new OrderDto(order)); } } public string ID { get { return id; } set { id = value; } } public string CompanyName { get { return companyName; } set { companyName = value; } } public List<OrderDto> OrderDtos { get { return orderDtos; } set { orderDtos = value; } } private List<OrderDto> orderDtos = new List<OrderDto>(); private string id; private string companyName; } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)