In AppConfig it is possible to use |DataDirectory|
but I can\'t find any doc ?
Incorrect guys! The |DataDirectory| refers to the mssql\data directory your instance is configured for.
So for example I am using Visual Studio 2012 inconjunction with SQL Express. |DataDirectory| places all MDF files under C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA where my sql express was installed not my solutions app_data folder.
Also the file is names MVCMovie.Models.MovieDBContext not Movies.mdf as specified in my web.config.
I'm thinking it needs to be configured somewhere in visual studio for it to be placed appropriately under app_data.