We have a table in the database which has multiple columns. We only want a query which will return only requested columns. These requested columns will from Odata Select Query requested using C# Web API.
For Example, I have an EmployeeTable which has below structure in SQL
And I am calling below sample API to get the results
This query should get only above 2 columns from the database; in the current scenario - Database returns all the columns and Odata configurations in Web API filters out the response before returning it to the user
Please help with how to implement this in the database.