How to get fields exist on table by passing table name by using asp.net core 2.1 ?


How to get fields exist on table by passing table name ?

suppose I have table name Employee on SQL server 2012

and this is fields of Employee Table EmployeeCode,EmployeeName,,..etc

How to make function pass to it table name and it will retrieve fields or columns as

EmployeeCode,

EmployeeName

I work on web API core project with angular 7

structure of function as below

Code:
public List<string> GetColumnNames(string tablename)
{
}