Exemple #1
0
        public async Task <IActionResult> UpdateCustomer(Models.Customer customerModel)
        {
            if (!_customersRepository.CustomerExists(customerModel.Id))
            {
                return(NotFound());
            }

            var customerEntity = _mapper.Map <Entities.Customer>(customerModel);

            await _customersRepository.UpdateCustomerAsync(customerEntity);

            return(NoContent());
        }
 public bool CustomerExists(Guid id)
 {
     return(_customersRepository.CustomerExists(id));
 }
 private bool CustomerExist(Guid id)
 {
     return(_customersRepository.CustomerExists(id));
 }