public virtual async Task <CustomerRoleDto> InsertCustomerRole(CustomerRoleDto model)
        {
            var customerRole = model.ToEntity();
            await _customerService.InsertCustomerRole(customerRole);

            //activity log
            await _customerActivityService.InsertActivity("AddNewCustomerRole", customerRole.Id, _localizationService.GetResource("ActivityLog.AddNewCustomerRole"), customerRole.Name);

            return(customerRole.ToModel());
        }
        public virtual async Task <CustomerRoleDto> UpdateCustomerRole(CustomerRoleDto model)
        {
            var customerRole = await _customerService.GetCustomerRoleById(model.Id);

            customerRole = model.ToEntity(customerRole);
            await _customerService.UpdateCustomerRole(customerRole);

            //activity log
            await _customerActivityService.InsertActivity("EditCustomerRole", customerRole.Id, _localizationService.GetResource("ActivityLog.EditCustomerRole"), customerRole.Name);

            return(customerRole.ToModel());
        }