예제 #1
0
        public IActionResult Delete(Guid id)
        {
            var rowsAffect = _customerGroupRepository.Delete(id);

            if (rowsAffect > 0)
            {
                return(Ok(rowsAffect));
            }
            else
            {
                return(NoContent());
            }
        }
예제 #2
0
 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));
     }
 }
예제 #3
0
 public void DeleteCustomerGroup(CustomerGroupDto customerGroupDto)
 {
     customerGroupRepository.Delete(customerGroupDto.MappingGroup());
 }