c # – How to connect two computers that do not belong to the same network via a desktop application?

I am developing a desktop application. The application will be installed on 2 PCs (and not on the same network). I want to connect both to an online database to store customer information. Each PC has a specific task to accomplish. want via the desktop app PC.1 can only read PC.2 data and vice versa
How to solve this problem?