title: How to get reference to SSDT Database Project memory model from a Visual Studio Extension?
body: <p>I'm trying to write a simple extension to the Visual Studio 2013, which should be able to list all tables in a SQL Server Database Project selected by an user of the extension. In order to do that, I need to access in-memory model of the DB project(s). But the only way I found is to load compiled .dacpac file produced by the DB project to a new TSqlModel instance and query it, but I would rather be able work with "live" in-memory representation. I've found this tutorial to SSDT API: <a href="http://blogs.msdn.com/b/ssdt/archive/2013/12/23/dacfx-public-model-tutorial.aspx" rel="nofollow">http://blogs.msdn.com/b/ssdt/archive/2013/12/23/dacfx-public-model-tutorial.aspx</a>, but there is not an example how to connect to the in-memory model within the Visual Studio. I also found a tutorial solving this issue by collecting all files with .sql extension from the current solution and added their content into the TSqlModel instance, but this is not the way I prefer.</p>
  
  <p>Is such thing possible at all? If so, how to do that?</p>
  
  <p>Thank you, 
  Michal</p>