ASP.NET MVC App has library that target .net471;net6.0-windows check status, start and stop SQL Server Agent.
I see 3 approach to do the above
- Query (could not find valid query to fetch the status)
Microsoft.SqlServer.Management.Sdk
Nuget Package – it is not appearing my project since my library target .net471;net6.0.- Rest API – limited operation
Please advise which is best in my context and could not find query to get the status.