In AppConfig it is possible to use |DataDirectory| but I can\'t find any doc ?
|DataDirectory|
There is an internal class called SqlConnectionHelper which parses this and creates the MDF if needed.
Here's the only MS doc I can find about that class and the |DataDirectory| macro: http://msdn.microsoft.com/en-us/library/aa478948.aspx.