示例#1
0
        public void AddCustomerAccount(Guid userId, List <CustomerAccountDataObject> customerAccountDataObject)
        {
            //Customer customer=  this.customerRepository.GetByKey(userId);
            //List<CustomerAccount> customerAccounts= AutoMapper.Mapper.Map<List<CustomerAccountDataObject>, List<CustomerAccount>>(customerAccountDataObject);
            //customer.CustomerAccount.AddRange(customerAccounts);
            //this.Context.RegisterModify<Customer>(customer);
            //this.Context.Commit();
            List <CustomerAccount> customerAccounts = AutoMapper.Mapper.Map <List <CustomerAccountDataObject>, List <CustomerAccount> >(customerAccountDataObject);

            customerRepository.AddCustomerAccount(userId, customerAccounts);
        }