コード例 #1
0
        public bool Update(CustomerDTO customerDto)
        {
            try
            {
                var customer = customerDto.ToCustomer();
                return(_customerRepository.Update(customer));
            }
            catch (Exception e)
            {
                _logger.LogError(e.ToString());
            }

            return(false);
        }
コード例 #2
0
        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());
            }
        }