Example #1
0
        private void RunMapper(int count)
        {
            List <CustomerViewItem> customers = new List <CustomerViewItem>();

            foreach (Customer customer in _customers)
            {
                CustomerViewItem customerViewItem =
                    Mapper.Map <Customer, CustomerViewItem>(customer);

                customers.Add(customerViewItem);
            }
        }
Example #2
0
        private void RunManual(int count)
        {
            List <CustomerViewItem> customers = new List <CustomerViewItem>();

            foreach (Customer customer in _customers)
            {
                CustomerViewItem customerViewItem = new CustomerViewItem()
                {
                    FirstName      = customer.FirstName,
                    LastName       = customer.LastName,
                    DateOfBirth    = customer.DateOfBirth,
                    NumberOfOrders = customer.NumberOfOrders,
                };

                customers.Add(customerViewItem);
            }
        }
        private void RunManual(int count)
        {
            List<CustomerViewItem> customers = new List<CustomerViewItem>();
            foreach (Customer customer in _customers)
            {
                CustomerViewItem customerViewItem = new CustomerViewItem()
                {
                    FirstName = customer.FirstName,
                    LastName = customer.LastName,
                    DateOfBirth = customer.DateOfBirth,
                    NumberOfOrders = customer.NumberOfOrders,
                };

                customers.Add(customerViewItem);
            }
        }