Esempio n. 1
0
        public async Task<ServiceResult> UpdateCustomer(UpdateCustomerRequest request)
        {
            try
            {
                CustomerEntity entity = await _userRepository.GetAsync(request.CustomerId);

                entity.DisplayName = request.DisplayName;
                await _userRepository.UpdateAsync(entity);

                return ServiceResult.Success();
            }
            catch (Exception ex)
            {
                return ServiceResult.Failed(ex.Message);
            }
        }
Esempio n. 2
0
 public async Task<IHttpActionResult> UpdateCustomer(UpdateCustomerRequest request)
 {
     var result = await _customerService.UpdateCustomer(request);
     return Ok(result);
 }