I want to develop a Web App in ASP.NET C# where I want to display chart based on SQL Table Column values. For that I need to extract all the values in JSON. So I kindly request to help me to perform the task ASAP.
Below code will give you all column names of a table
SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('News')
then you can read using ADO.NET and convert to json
https://geeksarray.com/blog/convert-datatable-to-csv-or-list-or-json-string-using-dot-net-core