public void CreateCustomer(CustomerModel customer) { var customerDb = _customerMapper.ToCustomer(customer); using (var wpfAppContext = new WpfAppContext()) { wpfAppContext.Customers.Add(customerDb); wpfAppContext.SaveChanges(); } }
public void CreateNew(CustomerDto customerDto) { var customer = _customerMapper.ToCustomer(customerDto); _customerRepository.Save(customer); }