Why don't you work off of Saturday's question
How to get fields exist on table by passing table name by using ASP.NET core 2.1 ?[
^]
To build onto that
1. Create a new Model which mirrors the basics of the sql system table which has the column information,
Information_Schema.Columns. While Entity Framework may not like working with that table, you can always use ADO.
SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE
, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE (TABLE_SCHEMA <> 'sys')
2. When you want to run your function, you can populate a collection of that new Model, and use LINQ or whatever you want to perform the search.
This approach would also allow you to find all tables that have a particular named column.