I have a simple requirement by my client but I am confused on how to do that task:
My client has an SQL Database and he wants a back-end service/operation which will do the following tasks:
Take credentials from user to connect to that database.
If any exception occurs then write that to a notepad file in that system.
After the connection is OK then that program will check if any new data has arrived in 1 specific table.
If the data has just inserted in that table from any source then my service will call an External API and post that latest row data to that API.
Thats It! Now I am stuck on where and how to proceed.
Any guidance/hint will be appreciated.
I am stuck between SQL and Windows Service decision, I myself think that I can go with 2 ways:
Approach 1 - Create a windows service which will run a timer in background and check if any row has inserted, if so then call external API.
Approach 2 - Create a trigger in SQL table which will then run a script/windows service which will then post that latest row data to that API.
I need to do the task in C# or SQL.
Please guide me.