Identify which Visual Studio project file contains a named database object

60 Views Asked by At

I need to develop a C# function which, given a named SQL Server database object e.g. [MySchema].[MyStoredProcedure], will identify which file in a Visual Studio database project contains the definition of that object. C:\Source\Database\Database1\MySchema\SomeArbitraryCategory\StoredProcs\MyStoreProc.sql

I could grep all the files, I know, but the scale of our solutions precludes this.

Reorganising the file structure is not an option.

How might this best be achieved?

0

There are 0 best solutions below