示例#1
0
        public Task <DeleteCustomerGroupResponse> deleteCustomerGroup(DeleteCustomerGroupRequest request)
        {
            DeleteCustomerGroupCommand command = new DeleteCustomerGroupCommand(request.Id);
            Task <object> CustomerGroup        = (Task <object>)Bus.SendCommand(command);
            //RabbitMQBus.Publish(command);
            DeleteCustomerGroupResponse response = new DeleteCustomerGroupResponse();

            response = Common <DeleteCustomerGroupResponse> .checkHasNotification(_notifications, response);

            return(Task.FromResult(response));
        }
示例#2
0
        public async Task <IActionResult> Delete(int id)
        {
            DeleteCustomerGroupRequest  request = new DeleteCustomerGroupRequest(id);
            DeleteCustomerGroupResponse result  = await _CustomerGroupAppService.deleteCustomerGroup(request);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(NotFound(result));
        }