0

How to return all stored procedures names/types listed in the model browser

enter image description here

Note: it is not possible in the Model Browser to copy all listed items or even a single one.

usefulBee
  • 9,250
  • 10
  • 51
  • 89
  • Hm, you can use some SQL against the database to get a list of sprocs. Would that work? Or do you want an EF-specific solution? –  Oct 12 '17 at 15:32
  • @Amy Right. However, what I am looking for is a list of all procedures used in a single application. – usefulBee Oct 12 '17 at 15:33
  • There isn't really any way to get a list of the *used* sprocs, aside from getting a list of all the sprocs and then, one by one, checking to see if each is used. –  Oct 12 '17 at 15:34
  • Maybe use [this](https://stackoverflow.com/questions/219434/query-to-list-all-stored-procedures) as a starting point? I'm trying to come up with a way of doing this in an EF-specific way. –  Oct 12 '17 at 15:36
  • @Amy, I am assuming that if they are listed in the browser or even wrapped in an entity framework object then there must be a way to get them. – usefulBee Oct 12 '17 at 15:36
  • 1
    Yes. I just don't know how to do that in code. Won't stop me from trying! Will probably require reflection. –  Oct 12 '17 at 15:37

1 Answers1

1

Look into the assembly's embedded resources for the SSDL. Functions with parameters and return types are described in Function elements.

SSDL

If you have the source code, the SSDL is in the .edmx file.

Tom Blodget
  • 20,260
  • 3
  • 39
  • 72