public bool Update(CustomerDTO customerDto) { try { var customer = customerDto.ToCustomer(); return(_customerRepository.Update(customer)); } catch (Exception e) { _logger.LogError(e.ToString()); } return(false); }
public void Create(CustomerDTO customerDto) { try { var customer = customerDto.ToCustomer(); //Create new Guid for new instances. customer.Id = new Guid(); _customerRepository.Create(customer); } catch (Exception e) { _logger.LogError(e.ToString()); } }