public IActionResult Delete(Guid id) { var rowsAffect = _customerGroupRepository.Delete(id); if (rowsAffect > 0) { return(Ok(rowsAffect)); } else { return(NoContent()); } }
public Task <object> Handle(DeleteCustomerGroupCommand command, CancellationToken cancellationToken) { if (!command.IsValid(_CustomerGroupRepository)) { NotifyValidationErrors(command); return(Task.FromResult(false as object)); } else { bool result = _CustomerGroupRepository.Delete(command.Id); return(Task.FromResult(true as object)); } }
public void DeleteCustomerGroup(CustomerGroupDto customerGroupDto) { customerGroupRepository.Delete(customerGroupDto.MappingGroup()); }