public async Task <DeleteMemberQueryResult> DeleteMemberQueryHandler(DeleteMemberCommand command) { var result = await _memberRepository.DeleteRecordAsync(command.Id); if (result == 1) { return(new DeleteMemberQueryResult() { IsSuccess = true }); } return(new DeleteMemberQueryResult() { IsSuccess = false }); }
public async Task <DeleteMemberCommandResult> DeleteMemberCommandHandler(Guid command) { var isSucceed = true; var affectedRecordsCount = await _memberRepository.DeleteRecordAsync(command); if (affectedRecordsCount < 1) { isSucceed = false; } return(new DeleteMemberCommandResult() { Succeed = isSucceed }); }