Bascially,LogParser is used to read IIS logs.We upload one log file to log parser, select query and we get results of query like :user agent,ip address(basically hits to particular url).That query is PS(PowerShell Script) file.
Any idea how to read that PS file and save output of that query to db?
As you have mentioned, you have powershell scripts to get logs, then you can run Powershell script using C#, and get result as List in C# then save it into database, here is the procedure step by step:
https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/ (Run powershell script using C#)
https://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C (Run powershell script using C#)
https://stackoverflow.com/questions/27927484/get-powershell-result-into-c-sharp-list (Get Powershell result as List)
I think above links, should solve your issue.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly